mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8312521: Unused field LocaleProviderAdapter#defaultLocaleProviderAdapter could be removed
Reviewed-by: naoto
This commit is contained in:
parent
b38bcae1ba
commit
c12ca885cc
1 changed files with 3 additions and 11 deletions
|
@ -108,12 +108,6 @@ public abstract class LocaleProviderAdapter {
|
||||||
*/
|
*/
|
||||||
private static final Map<Type, LocaleProviderAdapter> adapterInstances = new ConcurrentHashMap<>();
|
private static final Map<Type, LocaleProviderAdapter> adapterInstances = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
/**
|
|
||||||
* Default fallback adapter type, which should return something meaningful in any case.
|
|
||||||
* This is either CLDR or FALLBACK.
|
|
||||||
*/
|
|
||||||
static volatile LocaleProviderAdapter.Type defaultLocaleProviderAdapter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adapter lookup cache.
|
* Adapter lookup cache.
|
||||||
*/
|
*/
|
||||||
|
@ -147,13 +141,11 @@ public abstract class LocaleProviderAdapter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultLocaleProviderAdapter = Type.CLDR;
|
|
||||||
if (!typeList.isEmpty()) {
|
if (!typeList.isEmpty()) {
|
||||||
// bona fide preference exists
|
// bona fide preference exists
|
||||||
if (!(typeList.contains(Type.CLDR) || typeList.contains(Type.JRE))) {
|
if (!(typeList.contains(Type.CLDR) || typeList.contains(Type.JRE))) {
|
||||||
// Append FALLBACK as the last resort when no ResourceBundleBasedAdapter is available.
|
// Append FALLBACK as the last resort when no ResourceBundleBasedAdapter is available.
|
||||||
typeList.add(Type.FALLBACK);
|
typeList.add(Type.FALLBACK);
|
||||||
defaultLocaleProviderAdapter = Type.FALLBACK;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Default preference list.
|
// Default preference list.
|
||||||
|
@ -345,10 +337,10 @@ public abstract class LocaleProviderAdapter {
|
||||||
public abstract BreakIteratorProvider getBreakIteratorProvider();
|
public abstract BreakIteratorProvider getBreakIteratorProvider();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a ollatorProvider for this LocaleProviderAdapter, or null if no
|
* Returns a CollatorProvider for this LocaleProviderAdapter, or null if no
|
||||||
* ollatorProvider is available.
|
* CollatorProvider is available.
|
||||||
*
|
*
|
||||||
* @return a ollatorProvider
|
* @return a collatorProvider
|
||||||
*/
|
*/
|
||||||
public abstract CollatorProvider getCollatorProvider();
|
public abstract CollatorProvider getCollatorProvider();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue