< prev index next >

src/java.base/share/classes/java/net/URLStreamHandler.java

Print this page

        

@@ -74,19 +74,13 @@
      * Same as openConnection(URL), except that the connection will be
      * made through the specified proxy; Protocol handlers that do not
      * support proxying will ignore the proxy parameter and make a
      * normal connection.
      *
-     * <p> Calling this method preempts the system's default
+     * Calling this method preempts the system's default
      * {@link java.net.ProxySelector ProxySelector} settings.
      *
-     * @implSpec
-     * The default implementation of this method first checks that the given
-     * {code URL} and {code Proxy} are not null, then throws {@code
-     * UnsupportedOperationException}. Subclasses should override this method
-     * with an appropriate implementation.
-     *
      * @param      u   the URL that this connects to.
      * @param      p   the proxy through which the connection will be made.
      *                 If direct connection is desired, Proxy.NO_PROXY
      *                 should be specified.
      * @return     a {@code URLConnection} object for the {@code URL}.

@@ -97,12 +91,10 @@
      * @exception  UnsupportedOperationException if the subclass that
      *               implements the protocol doesn't support this method.
      * @since      1.5
      */
     protected URLConnection openConnection(URL u, Proxy p) throws IOException {
-        if (u == null || p == null)
-            throw new IllegalArgumentException("null " + (u == null ? "url" : "proxy"));
         throw new UnsupportedOperationException("Method not implemented.");
     }
 
     /**
      * Parses the string representation of a {@code URL} into a
< prev index next >