File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/java.base/share/classes/java/util Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2000, 2024 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2000, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -444,8 +444,8 @@ public static Currency getInstance(Locale locale) {
444444 public static Set <Currency > getAvailableCurrencies () {
445445 synchronized (Currency .class ) {
446446 if (available == null ) {
447+ var sysTime = System .currentTimeMillis ();
447448 available = new HashSet <>(256 );
448-
449449 // Add simple currencies first
450450 for (char c1 = 'A' ; c1 <= 'Z' ; c1 ++) {
451451 for (char c2 = 'A' ; c2 <= 'Z' ; c2 ++) {
@@ -467,7 +467,7 @@ public static Set<Currency> getAvailableCurrencies() {
467467 SpecialCaseEntry scEntry = specialCasesList .get (index );
468468
469469 if (scEntry .cutOverTime == Long .MAX_VALUE
470- || System . currentTimeMillis () < scEntry .cutOverTime ) {
470+ || sysTime < scEntry .cutOverTime ) {
471471 available .add (getInstance (scEntry .oldCurrency ,
472472 scEntry .oldCurrencyFraction ,
473473 scEntry .oldCurrencyNumericCode ));
You can’t perform that action at this time.
0 commit comments