On Tue, 26 Apr 2022 11:35:10 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:

>> - use `String.equalsIgnoreCase()` instead of hand-written code relying on 
>> `String.charAt()`
>> - use `String.compareToIgnoreCase()` instead of hand-written code relying on 
>> `String.charAt()`
>> - drop branches that are never executed
>> - drop unused argument from `URI.resolvePath()`
>> - simplify String-related operations
>
> src/java.base/share/classes/java/net/URI.java line 1921:
> 
>> 1919:                     return sn - tn;
>> 1920:                 int val = 0;
>> 1921:                 int n = Math.min(sn, tn);
> 
> Can we drop this change? I wouldn't like `java.net.URI` to gratuitously 
> trigger the loading of the Math class.
> For the rest of the proposed changes, I will need to study them carefully and 
> that may take some time.
> Thanks!

Not sure it matters that much? `Math` is already unconditionally loaded on 
bootstrap, though slightly after `URI` in the bootstrap sequence.

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

PR: https://git.openjdk.java.net/jdk/pull/8397

Reply via email to