Skip to content

Commit

Permalink
8312521: Unused field LocaleProviderAdapter#defaultLocaleProviderAdap…
Browse files Browse the repository at this point in the history
…ter could be removed

Reviewed-by: naoto
  • Loading branch information
Andrey Turbanov committed Aug 31, 2023
1 parent b38bcae commit c12ca88
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ public String getTextResourcesPackage() {
*/
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.
*/
Expand Down Expand Up @@ -147,13 +141,11 @@ public String getTextResourcesPackage() {
}
}

defaultLocaleProviderAdapter = Type.CLDR;
if (!typeList.isEmpty()) {
// bona fide preference exists
if (!(typeList.contains(Type.CLDR) || typeList.contains(Type.JRE))) {
// Append FALLBACK as the last resort when no ResourceBundleBasedAdapter is available.
typeList.add(Type.FALLBACK);
defaultLocaleProviderAdapter = Type.FALLBACK;
}
} else {
// Default preference list.
Expand Down Expand Up @@ -345,10 +337,10 @@ public static Locale[] toLocaleArray(Set<String> tags) {
public abstract BreakIteratorProvider getBreakIteratorProvider();

/**
* Returns a ollatorProvider for this LocaleProviderAdapter, or null if no
* ollatorProvider is available.
* Returns a CollatorProvider for this LocaleProviderAdapter, or null if no
* CollatorProvider is available.
*
* @return a ollatorProvider
* @return a collatorProvider
*/
public abstract CollatorProvider getCollatorProvider();

Expand Down

1 comment on commit c12ca88

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.