<i18n dev> RFR: 8267587: Update java.util to use enhanced switch [v5]

Tagir F.Valeev tvaleev at openjdk.java.net
Wed May 26 02:30:16 UTC 2021


On Tue, 25 May 2021 16:52:06 GMT, Brian Goetz <briangoetz at openjdk.org> wrote:

>> Tagir F. Valeev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   More vertical alignment
>
> src/java.base/share/classes/java/util/JapaneseImperialCalendar.java line 1371:
> 
>> 1369:                     }
>> 1370:                 }
>> 1371:             }
> 
> Pull value assignment out of switch?

This is a much bigger change which is probably harder to review. I did it, please take a look. One point is whether to unwrap the final `else` after `yield`:

if (...) {
    ...
    yield ...
} else { // should we remove else?
    ...
}

I prefer unwrapping, as this reduces the indentation, so I did it. Please tell me if this contradicts with the preferred OpenJDK style.

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

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


More information about the i18n-dev mailing list