Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v4]

2025-01-28 Thread Justin Lu
On Fri, 24 Jan 2025 18:00:06 GMT, Justin Lu wrote: >> Please review this PR and CSR which add a pair of methods to >> _java.util.TimeZone_ that return a stream of the available IDs. See the CSR >> for the motivation. >> >> A number of existing tests are modified to use the new methods. See >>

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v4]

2025-01-27 Thread Roger Riggs
On Fri, 24 Jan 2025 18:00:06 GMT, Justin Lu wrote: >> Please review this PR and CSR which add a pair of methods to >> _java.util.TimeZone_ that return a stream of the available IDs. See the CSR >> for the motivation. >> >> A number of existing tests are modified to use the new methods. See >>

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v4]

2025-01-24 Thread Naoto Sato
On Fri, 24 Jan 2025 18:00:06 GMT, Justin Lu wrote: >> Please review this PR and CSR which add a pair of methods to >> _java.util.TimeZone_ that return a stream of the available IDs. See the CSR >> for the motivation. >> >> A number of existing tests are modified to use the new methods. See >>

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v4]

2025-01-24 Thread Justin Lu
> Please review this PR and CSR which add a pair of methods to > _java.util.TimeZone_ that return a stream of the available IDs. See the CSR > for the motivation. > > A number of existing tests are modified to use the new methods. See > _test/jdk/java/util/TimeZone/AvailableIDsTest.java_ which

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-24 Thread Andrey Turbanov
On Thu, 23 Jan 2025 22:48:17 GMT, Chen Liang wrote: >> Right, it can be removed. Actually, I think `getAvailableIDs()` and >> `getAvailableIDs(int)` also do not need to be synchronized. The internal IDs >> are eagerly initialized in the static block of `ZoneInfoFile.java` and are >> effectivel

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-23 Thread Chen Liang
On Thu, 23 Jan 2025 22:23:29 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/util/TimeZone.java line 659: >> >>> 657: * @since 25 >>> 658: */ >>> 659: public static synchronized Stream availableIDs(int >>> rawOffset) { >> >> Why are these new methods synchronized? I thi

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-23 Thread Justin Lu
On Thu, 23 Jan 2025 20:04:04 GMT, Chen Liang wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> include copyright bump for missed file in JDK-834836501 > > src/java.base/share/classes/java/util/TimeZone.java line 659: >

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-23 Thread Chen Liang
On Thu, 23 Jan 2025 19:50:04 GMT, Justin Lu wrote: >> Please review this PR and CSR which add a pair of methods to >> _java.util.TimeZone_ that return a stream of the available IDs. See the CSR >> for the motivation. >> >> A number of existing tests are modified to use the new methods. See >>

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-23 Thread Justin Lu
On Thu, 23 Jan 2025 19:13:22 GMT, Naoto Sato wrote: >> Actually I'm wondering if we should specify these `rawOffset` methods with >> an `@implNote` that states they are sorted. > > I'd rather not. If we did, users would wonder why no-arg return is not > sorted, which might be a mere overlook (a

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-23 Thread Justin Lu
> Please review this PR and CSR which add a pair of methods to > _java.util.TimeZone_ that return a stream of the available IDs. See the CSR > for the motivation. > > A number of existing tests are modified to use the new methods. See > _test/jdk/java/util/TimeZone/AvailableIDsTest.java_ which

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v2]

2025-01-23 Thread Naoto Sato
On Thu, 23 Jan 2025 19:02:32 GMT, Justin Lu wrote: >> 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 wonderin

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v2]

2025-01-23 Thread Justin Lu
On Thu, 23 Jan 2025 18:58:46 GMT, Justin Lu 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(); // Sor

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v2]

2025-01-23 Thread Justin Lu
On Thu, 23 Jan 2025 17:41:35 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> reflect Naoto's review > > src/java.base/share/classes/java/util/TimeZone.java line 652: > >> 650: * >> 651: * @p

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v2]

2025-01-23 Thread Justin Lu
> Please review this PR and CSR which add a pair of methods to > _java.util.TimeZone_ that return a stream of the available IDs. See the CSR > for the motivation. > > A number of existing tests are modified to use the new methods. See > _test/jdk/java/util/TimeZone/AvailableIDsTest.java_ which

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs

2025-01-23 Thread Naoto Sato
On Thu, 23 Jan 2025 02:49:49 GMT, Justin Lu wrote: > Please review this PR and CSR which add a pair of methods to > _java.util.TimeZone_ that return a stream of the available IDs. See the CSR > for the motivation. > > A number of existing tests are modified to use the new methods. See > _test

RFR: 8347955: TimeZone methods to stream the available timezone IDs

2025-01-22 Thread Justin Lu
Please review this PR and CSR which add a pair of methods to _java.util.TimeZone_ that return a stream of the available IDs. See the CSR for the motivation. A number of existing tests are modified to use the new methods. See _test/jdk/java/util/TimeZone/AvailableIDsTest.java_ which tests the ne