RFR: 8263668: Update java.time to use instanceof pattern variable [v6]
Patrick Concannon
pconcannon at openjdk.java.net
Wed Apr 21 10:58:34 UTC 2021
On Wed, 24 Mar 2021 11:06:38 GMT, RĂ©mi Forax <github.com+828220+forax at openjdk.org> wrote:
>> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Updated single letter pattern variable names
>
> src/java.base/share/classes/java/time/format/DateTimeFormatterBuilder.java line 168:
>
>> 166: private static final TemporalQuery<ZoneId> QUERY_REGION_ONLY = (temporal) -> {
>> 167: ZoneId zone = temporal.query(TemporalQueries.zoneId());
>> 168: return (zone != null && (!(zone instanceof ZoneOffset)) ? zone : null);
>
> i find this code hard to read
> `return (zone != null && (!(zone instanceof ZoneOffset))) ? zone : null;`
> seems better`
Updated in 647bd6b as suggested by Michael Kuhlmann
-------------
PR: https://git.openjdk.java.net/jdk/pull/3170
More information about the core-libs-dev
mailing list