RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]
Naoto Sato
naoto at openjdk.org
Fri Jan 24 17:25:57 UTC 2025
On Thu, 16 Jan 2025 13:02:34 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> There are 3 methods in `java.util.TimeZone` which are `public static` and marked as `synchronized`:
>> 1. getTimeZone(String)
>> 2. getAvailableIDs(int)
>> 3. getAvailableIDs()
>>
>> This means it is a bottle neck for the whole VM.
>> I've checked the implementation and concluded that `synchronized` is unnecessary.
>
> Andrey Turbanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
>
> - Merge remote-tracking branch 'refs/remotes/origin/master' into JDK-8291027-TimeZone-synchronized
>
> # Conflicts:
> # src/java.base/share/classes/java/util/TimeZone.java
> - 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily
Yes, I think this change is benign. Those synchronization was (I think) leftovers from the old refactoring (https://mail.openjdk.org/pipermail/core-libs-dev/2022-July/092860.html)
Sorry for taking so long for the review.
-------------
Marked as reviewed by naoto (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17441#pullrequestreview-2573212778
More information about the core-libs-dev
mailing list