public void setFailureDetectionPorts(GMSMembershipView<ID> otherView) {
    int[] ports = otherView.getFailureDetectionPorts();
    if (ports != null) {
      int idx = 0;
      int portsSize = ports.length;
      for (ID mbr : otherView.getMembers()) {
        if (contains(mbr)) {
          // unit tests create views w/o failure detection ports, so we must check the length
          // of the array
          if (idx < portsSize) {
            setFailureDetectionPort(mbr, ports[idx]);
          } else {
            setFailureDetectionPort(mbr, -1);
          }
        }
        idx += 1;
      }
    }
  }
Transfer the failure-detection ports from another view to this one
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/GMSMembershipView.java