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

Alan Bateman Alan.Bateman at oracle.com
Thu May 30 12:42:21 UTC 2019


On 30/05/2019 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
>
Looks fine. I've added myself as Reviewer to the CSR.

-Alan


More information about the net-dev mailing list