RFR: 8318150: StaticProxySelector.select should not throw NullPointerExceptions [v2]

Daniel Jeliński djelinski at openjdk.org
Tue Oct 17 08:50:44 UTC 2023


On Tue, 17 Oct 2023 03:53:22 GMT, David Schlosnagle <duke at openjdk.org> wrote:

>> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use equalsIgnoreCase
>
> 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")) {

Done.

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

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


More information about the net-dev mailing list