code: public Endpoint withDefaultPort(int defaultPort) {
          ensureSingle();
          validatePort("defaultPort", defaultPort);
  
          if (port != 0) {
              return this;
          }
  
          return new Endpoint(host(), ipAddr(), defaultPort, weight(), hostType);
      }
docs: Returns a new host endpoint with the specified default port number.
  
  @return the new endpoint whose port is {@code defaultPort} if this endpoint does not have its port
  specified. {@code this} if this endpoint already has its port specified.
  
  @throws IllegalStateException if this endpoint is not a host but a group