-
Bug
-
Resolution: Fixed
-
P2
-
20
The tests validate "https://download.java.net/java/early_access/jdk20/docs/api/java.base/java/util/Locale.html"
"For the backward compatible behavior, the system property java.locale.useOldISOCodes reverts the behavior back to that of before Java SE 17. If the system property is set to true, those three current language codes are mapped to their backward compatible forms. The property is only read at Java runtime startup and subsequent calls to System.setProperty() will have no effect."
So the tests are providing the property during JVM start and also trying to override programmatically using System.setProperty() to prove that the later does not have any effect.
But JDK20-b18 looks breaks this expectation.
Please find a stand alone code to demonstrate the problem.
Results :
run with b18
/scratch/jdk-cache/20/18/jdk-20/bin/java -Djava.locale.useOldISOCodes=true ISOCodeTest
Expected that newcode mapped to old
run with b17
/scratch/jdk-cache/20/17/jdk-20/bin/java -Djava.locale.useOldISOCodes=true ISOCodeTest
Expected
Possible cause :
All I can suspect is - sun.util.locale:BaseLocale is loaded lazily from b18 where the "java.locale.useOldISOCodes" property is read.
"For the backward compatible behavior, the system property java.locale.useOldISOCodes reverts the behavior back to that of before Java SE 17. If the system property is set to true, those three current language codes are mapped to their backward compatible forms. The property is only read at Java runtime startup and subsequent calls to System.setProperty() will have no effect."
So the tests are providing the property during JVM start and also trying to override programmatically using System.setProperty() to prove that the later does not have any effect.
But JDK20-b18 looks breaks this expectation.
Please find a stand alone code to demonstrate the problem.
Results :
run with b18
/scratch/jdk-cache/20/18/jdk-20/bin/java -Djava.locale.useOldISOCodes=true ISOCodeTest
Expected that newcode mapped to old
run with b17
/scratch/jdk-cache/20/17/jdk-20/bin/java -Djava.locale.useOldISOCodes=true ISOCodeTest
Expected
Possible cause :
All I can suspect is - sun.util.locale:BaseLocale is loaded lazily from b18 where the "java.locale.useOldISOCodes" property is read.
- relates to
-
JDK-8295295 CDS ArchivedEnumTest fails with StaticProperty::JAVA_LOCALE_USE_OLD_ISO_CODES
-
- Resolved
-