On Fri, 30 Sep 2022 11:46:39 GMT, Claes Redestad <redes...@openjdk.org> wrote:

>> Move a simple utility method from `URL` to the shared `sun.net.util.URLUtil` 
>> class, rename it for clarity and enhance it so that it returns the string 
>> literal if the protocol matches one of the tested variants. This helps 
>> reduce dependencies from bootstrap code on `Locale` while improving the 
>> performance and allocation pressure in certain applications.
>
> Claes Redestad has updated the pull request incrementally with two additional 
> commits since the last revision:
> 
>  - Cleanups
>  - Revert accidental import mangling

src/java.base/share/classes/java/net/URL.java line 1388:

> 1386:      */
> 1387:     static String lowerCaseProtocol(String protocol) {
> 1388:         if (protocol.equals("jrt")) {

I don't get the difference between chaining with `||` and `if-else if`?

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

PR: https://git.openjdk.org/jdk/pull/10506

Reply via email to