public List<Transfer> getTransfers() {
    if (null == transfers) {
      return Collections.emptyList();
    }

    List<Transfer> list = new ArrayList<>();
    for (Transfer t : transfers) {
      switch (t.operation) {
        case COPY:
        case MOVE:
          if (null != t.fromKey && null != t.toKey) {
            list.add(t);
          } else {
            LOG.warn(String.format("Transfer %s is invalid", t));
          }
          break;
        case DELETE:
          if (null != t.deleteKey) {
            list.add(t);
          } else {
            LOG.warn(String.format("Transfer %s is invalid", t));
          }

          break;
      }
    }

    return list;
  }
@return the list of transfers, checking for appropriate null fields.
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/ConfigUpgradeChangeDefinition.java