RFR [13] 8224973: URLStreamHandler.openConnection(URL,Proxy) - spec and implementation mismatch
Chris Hegarty
chris.hegarty at oracle.com
Thu May 30 11:04:05 UTC 2019
The current default implementation of openConnection(URL,Proxy) simply
throws UnsupportedOperationException. Pedantically, this violates its
own specification, since it does not throw IllegalArgumentException when
passed a null value.
To resolve this, the default implementation should be updated and
specified. Trivially, perform null argument checking, and subsequently
throw UnsupportedOperationException ( since the URL stream handler
implementation can realistically do nothing more ).
Webrev:
https://cr.openjdk.java.net/~chegar/8224973/webrev.00/
CSR:
https://bugs.openjdk.java.net/browse/JDK-8225047
-Chris.
P.S. There are a number of these minor API / default implementation
issues in the java.net package, resulting from evolution over the years.
More information about the net-dev
mailing list