<i18n dev> RFR: 8347955: TimeZone methods to stream the available timezone IDs [v2]

Justin Lu jlu at openjdk.org
Thu Jan 23 19:04:49 UTC 2025


On Thu, 23 Jan 2025 18:58:46 GMT, Justin Lu <jlu at openjdk.org> wrote:

>> src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java line 122:
>> 
>>> 120:         return zoneIds()
>>> 121:                 .filter(id -> getZoneInfo(id).getRawOffset() == rawOffset)
>>> 122:                 .sorted(); // Sort the IDs, see getZoneIds(int)
>> 
>> This is interesting. one with `rawOffset` is soreted, but the other is not. It is inconsistent but probably we should align as you did here.
>
> Noticed that too. There is also the argument that since these stream methods are new, we can leave it un-sorted but we would have to specify the deviation. Although I agree it is best to align for consistency.

Actually I'm wondering if we should specify these `rawOffset` methods with an `@implNote` that states they are sorted.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23251#discussion_r1927544428


More information about the i18n-dev mailing list