code: private static boolean isDefaultHttpOrHttpsPort(String scheme, int port) {
          if (port == DEFAULT_HTTP_PORT && isHttp(scheme)) {
              return true;
          }
          if (port == DEFAULT_HTTPS_PORT && isHttps(scheme)) {
              return true;
          }
          return false;
      }
docs: Tells whether or not the given {@code port} is the default for the given {@code scheme}.
  <p>
  The method returns always {@code false} for non HTTP or HTTPS schemes.
  
  @param scheme the scheme of a URI, might be {@code null}
  @param port the port of a URI
  @return {@code true} if the {@code port} is the default for the given {@code scheme}, {@code false} otherwise