8138613: Remove SPI locale provider adapter from the default provider list
Reviewed-by: okutsu
This commit is contained in:
parent
673882edf9
commit
f8dca18a53
@ -140,8 +140,10 @@ import java.util.Locale;
|
|||||||
* desired locale sensitive service is not available, then the runtime looks for CLDR,
|
* desired locale sensitive service is not available, then the runtime looks for CLDR,
|
||||||
* JRE in that order.
|
* JRE in that order.
|
||||||
* <p>
|
* <p>
|
||||||
* The default order for looking up the preferred locale providers is "CLDR,JRE,SPI",
|
* The default order for looking up the preferred locale providers is "CLDR,JRE",
|
||||||
* so specifying "CLDR,JRE,SPI" is identical to the default behavior.
|
* so specifying "CLDR,JRE" is identical to the default behavior. Applications which
|
||||||
|
* require implementations of the locale sensitive services must explicitly specify
|
||||||
|
* "SPI" in order for the Java runtime to load them from the classpath.
|
||||||
*
|
*
|
||||||
* @since 1.6
|
* @since 1.6
|
||||||
*/
|
*/
|
||||||
|
@ -185,7 +185,6 @@ public abstract class LocaleProviderAdapter {
|
|||||||
LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
|
LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
|
||||||
}
|
}
|
||||||
typeList.add(Type.JRE);
|
typeList.add(Type.JRE);
|
||||||
typeList.add(Type.SPI);
|
|
||||||
defaultLocaleProviderAdapter = Type.JRE;
|
defaultLocaleProviderAdapter = Type.JRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8008577
|
* @bug 8008577 8138613
|
||||||
* @summary Check whether CLDR locale provider adapter is enabled by default
|
* @summary Check whether CLDR locale provider adapter is enabled by default
|
||||||
* @compile -XDignore.symbol.file Bug8008577.java
|
* @compile -XDignore.symbol.file Bug8008577.java
|
||||||
* @run main Bug8008577
|
* @run main Bug8008577
|
||||||
@ -38,7 +38,6 @@ public class Bug8008577 {
|
|||||||
static final LocaleProviderAdapter.Type[] expected = {
|
static final LocaleProviderAdapter.Type[] expected = {
|
||||||
LocaleProviderAdapter.Type.CLDR,
|
LocaleProviderAdapter.Type.CLDR,
|
||||||
LocaleProviderAdapter.Type.JRE,
|
LocaleProviderAdapter.Type.JRE,
|
||||||
LocaleProviderAdapter.Type.SPI,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user