RFR: 8285521: Minor improvements in java.net.URI
Daniel Fuchs
dfuchs at openjdk.java.net
Tue Apr 26 11:38:47 UTC 2022
On Tue, 26 Apr 2022 07:02:55 GMT, Сергей Цыпанов <duke at openjdk.java.net> 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!
-------------
PR: https://git.openjdk.java.net/jdk/pull/8397
More information about the net-dev
mailing list