static int validatePort(String portString, String hostPort) {
    for (int i = 0, length = portString.length(); i < length; i++) {
      char c = portString.charAt(i);
      if (c >= '0' && c <= '9') continue; // isDigit
      throw new IllegalArgumentException(hostPort + " has an invalid port");
    }
    int result = Integer.parseInt(portString);
    if (result == 0 || result > 0xffff) {
      throw new IllegalArgumentException(hostPort + " has an invalid port");
    }
    return result;
  }
Constructs a host-port pair from the given string, defaulting to the indicated port if absent
zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/internal/HostAndPort.java