mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8295232: "java.locale.useOldISOCodes" property is read lazily
Reviewed-by: lancea, bpb, iris, rriggs, coffeys
This commit is contained in:
parent
3b3438752c
commit
4224d45132
3 changed files with 70 additions and 3 deletions
|
@ -33,8 +33,8 @@
|
|||
package sun.util.locale;
|
||||
|
||||
import jdk.internal.misc.CDS;
|
||||
import jdk.internal.util.StaticProperty;
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
import java.lang.ref.SoftReference;
|
||||
import java.util.StringJoiner;
|
||||
|
@ -101,9 +101,10 @@ public final class BaseLocale {
|
|||
|
||||
/**
|
||||
* Boolean for the old ISO language code compatibility.
|
||||
* The system property "java.locale.useOldISOCodes" is not security sensitive,
|
||||
* so no need to ensure privileged access here.
|
||||
*/
|
||||
private static final boolean OLD_ISO_CODES = GetPropertyAction.privilegedGetProperties()
|
||||
.getProperty("java.locale.useOldISOCodes", "false")
|
||||
private static final boolean OLD_ISO_CODES = StaticProperty.javaLocaleUseOldISOCodes()
|
||||
.equalsIgnoreCase("true");
|
||||
|
||||
// This method must be called with normalize = false only when creating the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue