On Thu, 23 Jan 2025 19:50:04 GMT, Justin Lu <j...@openjdk.org> 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/jdk/java/util/TimeZone/AvailableIDsTest.java_ which tests the new >> methods. > > 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23251#discussion_r1927614576