On Mon, 16 Oct 2023 09:21:52 GMT, Daniel Jeliński <[email protected]> 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.

src/java.base/share/classes/java/net/ProxySelector.java line 227:

> 225:             }
> 226:             scheme = scheme.toLowerCase(Locale.ROOT);
> 227:             if (scheme.equals("http") || scheme.equals("https")) {

maybe outside the scope of this PR, but could avoid the `toLowerCase`

Suggestion:

            if (scheme.equalsIgnoreCase("http") || 
scheme.equalsIgnoreCase("https")) {

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16199#discussion_r1361478833

Reply via email to