RFR: 8230310: SocksSocketImpl should handle the IllegalArgumentException thrown by ProxySelector.select usage

Jaikiran Pai jai.forums2013 at gmail.com
Wed Aug 28 14:47:52 UTC 2019


Can I please get a review and a sponsor for the patch for
https://bugs.openjdk.java.net/browse/JDK-8230310? The patch is hosted as
a webrev at [1].

As noted in that JBS issue, this is a follow-up patch to the changes
that were done as part of [2]. During that patch review, it was decided
that remaining usages of ProxySelector.select() would be updated
accordingly if relevant. My search for this method usage shows this
java.net.SocksSocketImpl as one such relevant place.

There are a couple of more usages in the main source code - one in
jdk.internal.net.http.websocket.OpeningHandshake.proxyFor and the other
in jdk.internal.net.http.HttpRequestImpl.retrieveProxy. Both these
methods are private and the nature of their usage of
ProxySelector.select suggests that they don't need any update and can
continue to just throw the IAE as is. However, my knowledge of the
codebase is very limited, so if these too need to be updated in some way
(I don't think wrapping and throwing an IOException would be right),
then do let me know, please.

There are some usages in a tests, which I haven't yet looked much into.

[1] http://cr.openjdk.java.net/~jpai/webrev/8230310/1/webrev/

[2] https://bugs.openjdk.java.net/browse/JDK-8177648

P.S: I created the JBS issue as a "Task". If it's supposed to be
something else, please feel free to change it.

-Jaikiran




More information about the net-dev mailing list