RFR: 8285521: Minor improvements in java.net.URI

Сергей Цыпанов duke at openjdk.java.net
Tue Apr 26 12:44: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

Btw, I see that `java.net.URI` duplicates some methods from `sun.net.www.ParseUtil`. Should we consolidate them e.g. in a way of reusing functionality of `sun.net.www.ParseUtil` in `java.net.URI`?

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

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


More information about the net-dev mailing list