<i18n dev> RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

Naoto Sato naoto at openjdk.java.net
Tue Jun 22 17:50:10 UTC 2021


On Tue, 22 Jun 2021 16:07:12 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

>> Hi,
>> 
>> Could someone please review the second half of my update for the `java.time` package to make use of switch expressions?
>> 
>> This PR was split into two parts due to the large number of files affected.
>> 
>> Kind regards,
>> 
>> Patrick
>
> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8269124: Added missing brace; fixed build issue

src/java.base/share/classes/java/time/Instant.java line 562:

> 560:     public int get(TemporalField field) {
> 561:         if (field instanceof ChronoField) {
> 562:             return switch ((ChronoField) field) {

Not really comment on the change itself, but Is this a leftover from the `instanceof` pattern variable exercise, or will we have another round for that? I see other locations which could be leftovers.

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

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


More information about the i18n-dev mailing list