Skip to content

Commit

Permalink
Fixed compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Dec 20, 2024
1 parent 1e09b8b commit 8dca103
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/java.base/share/classes/java/time/ZoneOffset.java
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,9 @@ public static ZoneOffset ofTotalSeconds(int totalSeconds) {
if (result == null) {
result = new ZoneOffset(totalSeconds);
var existing = SECONDS_CACHE.putIfAbsent(totalSecs, result);
return (existing != null) ? existing : result;
if (existing != null) {
result = existing;
}
ID_CACHE.putIfAbsent(result.getId(), result);
}
return result;
Expand Down

0 comments on commit 8dca103

Please sign in to comment.