private boolean validateMembershipRange(String membershipPortRange) {
    int[] range = null;
    if (membershipPortRange != null && membershipPortRange.trim().length() > 0) {
      String[] splitted = membershipPortRange.split("-");
      range = new int[2];
      range[0] = Integer.parseInt(splitted[0].trim());
      range[1] = Integer.parseInt(splitted[1].trim());
      // NumberFormatException if any could be thrown

      if (range[0] < 0 || range[0] >= range[1] || range[1] < 0 || range[1] > 65535) {
        range = null;
      }
    }
    return range != null;
  }
Validates the given string - which is expected in the format as two numbers separated by a
minus sign - in to an integer array of length 2 with first element as lower end & second
element as upper end of the range.

@param membershipPortRange membership-port-range given as two numbers separated by a minus
       sign.
@return true if the membership-port-range string is valid, false otherwise
geode-core/src/main/java/org/apache/geode/admin/internal/DistributedSystemConfigImpl.java