--- old/src/java.base/share/classes/sun/util/locale/provider/CurrencyNameProviderImpl.java 2014-08-22 11:18:33.291992486 -0700 +++ new/src/java.base/share/classes/sun/util/locale/provider/CurrencyNameProviderImpl.java 2014-08-22 11:18:32.936987238 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,16 +40,15 @@ public class CurrencyNameProviderImpl extends CurrencyNameProvider implements AvailableLanguageTags { private final LocaleProviderAdapter.Type type; - private final Set langtags; + private Set langtags; - public CurrencyNameProviderImpl(LocaleProviderAdapter.Type type, Set langtags) { + public CurrencyNameProviderImpl(LocaleProviderAdapter.Type type) { this.type = type; - this.langtags = langtags; } @Override public Set getAvailableLanguageTags() { - return langtags; + return getLangTags(); } /** @@ -61,7 +60,7 @@ */ @Override public Locale[] getAvailableLocales() { - return LocaleProviderAdapter.toLocaleArray(langtags); + return LocaleProviderAdapter.toLocaleArray(getLangTags()); } /** @@ -121,4 +120,11 @@ return LocaleProviderAdapter.forType(type).getLocaleResources(locale).getCurrencyName(key); } + + private Set getLangTags() { + if (langtags == null) { + langtags = ((JRELocaleProviderAdapter)LocaleProviderAdapter.forType(type)).getLanguageTagSet("CurrencyNames"); + } + return langtags; + } }