On Thu, 23 Jan 2025 20:04:04 GMT, Chen Liang <li...@openjdk.org> 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:
> 
>> 657:      * @since 25
>> 658:      */
>> 659:     public static synchronized Stream<String> availableIDs(int 
>> rawOffset) {
> 
> Why are these new methods synchronized? I think the streams and the 
> spliterators are late-binding, so the synchronization does not synchronize 
> the access to the underlying arrays. synchronized modifier also does not 
> appear in Javadoc and is not part of the API surface, so it can be safely 
> removed.

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 
effectively final and not modified.

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

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

Reply via email to