Skip to content

Commit bef5f56

Browse files
author
Andrey Turbanov
committedJan 24, 2025
8291027: Some of TimeZone methods marked 'synchronized' unnecessarily
Reviewed-by: liach, naoto, jlu
1 parent 8e8f800 commit bef5f56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/java.base/share/classes/java/util/TimeZone.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ public boolean observesDaylightTime() {
545545
* cannot be understood.
546546
* @throws NullPointerException if {@code ID} is {@code null}
547547
*/
548-
public static synchronized TimeZone getTimeZone(String ID) {
548+
public static TimeZone getTimeZone(String ID) {
549549
return getTimeZone(ID, true);
550550
}
551551

@@ -621,15 +621,15 @@ private static TimeZone getTimeZone(String ID, boolean fallback) {
621621
* both have GMT-07:00, but differ in daylight saving behavior.
622622
* @see #getRawOffset()
623623
*/
624-
public static synchronized String[] getAvailableIDs(int rawOffset) {
624+
public static String[] getAvailableIDs(int rawOffset) {
625625
return ZoneInfo.getAvailableIDs(rawOffset);
626626
}
627627

628628
/**
629629
* Gets all the available IDs supported.
630630
* @return an array of IDs.
631631
*/
632-
public static synchronized String[] getAvailableIDs() {
632+
public static String[] getAvailableIDs() {
633633
return ZoneInfo.getAvailableIDs();
634634
}
635635

0 commit comments

Comments
 (0)
Please sign in to comment.