RFR [13] 8224973: URLStreamHandler.openConnection(URL,Proxy) - spec and implementation mismatch

Daniel Fuchs daniel.fuchs at oracle.com
Thu May 30 17:08:15 UTC 2019


Looks fine Chris!

best regards,

-- daniel

On 30/05/19 12:04, Chris Hegarty wrote:
> 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