RFR: 8318150: StaticProxySelector.select should not throw NullPointerExceptions
Daniel Jeliński
djelinski at openjdk.org
Mon Oct 16 13:18:42 UTC 2023
On Mon, 16 Oct 2023 09:21:52 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> `ProxySelector.select` and `connectFailed` methods should throw `IllegalArgumentException`s on null parameters.
>
> Additionally, the `select` method doesn't need to be synchronized - the selector is immutable.
>
> Tier2 green.
There are only 2 implementations of ProxySelector in the JDK, and they are both covered by this test. `-Djava.net.useSystemProxies=true` changes the behavior of DefaultProxySelector, but parameter validation code path is the same in both cases. I could add a separate `@run` line with `-Djava.net.useSystemProxies=true`, but in the current state it would just run the same code again.
Will post a CSR and a release note soon.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16199#issuecomment-1764463803
More information about the net-dev
mailing list