public static List<HostAndPort> parseLocators(String locatorsString, String bindAddress)
      throws MembershipConfigurationException {
    InetAddress addr = null;

    try {
      if (bindAddress == null || bindAddress.trim().length() == 0) {
        addr = LocalHostUtil.getLocalHost();
      } else {
        addr = InetAddress.getByName(bindAddress);
      }
    } catch (UnknownHostException e) {
      // ignore
    }
    return parseLocators(locatorsString, addr);
  }
parse locators & check that the resulting address is compatible with the given address

@param locatorsString a DistributionConfig "locators" string
@param bindAddress optional address to check for loopback compatibility
@return addresses of locators
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/api/LocatorConfigurationParser.java