On Fri, 30 Sep 2022 12:36:10 GMT, Сергей Цыпанов <[email protected]> wrote:

>> 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`?

There'd be no point in changing from a `||`-chain to `if.. else if` unless 
there's also a need to have different results happen from either case. Here we 
now want to return the appropriate constant (`"jrt"` etc), thus splitting the 
`||` is necessary.

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

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

Reply via email to