<i18n dev> Request for Review : JDK-8071929 -Locale.getISOCountries() has inconsistent behaviour for "AN", "BU" and "CS" country codes.
Masayoshi Okutsu
masayoshi.okutsu at oracle.com
Wed Nov 30 04:12:42 UTC 2016
Hi Rachna,
It's still unclear for me how this addition will be useful for
applications. But here are my comments on the implementation.
src/java.base/share/classes/java/util/LocaleISOData.java:
- iso3166CodesMap has to use a ConcurrentHashMap.
- The following code should use AssertionError rather than assert.
509 default:
510 // should not happen
511 assert false;
512 return Collections.emptySet();
- Another implementation option would be to move the new get* methods
and the cache to Locale.IsoCountryCode so that the default case can be
avoided.
Thanks,
Masayoshi
On 11/29/2016 6:07 PM, Rachna Goel wrote:
> Hi,
>
> Please review fix for JDK-8071929.
>
> Bug : https://bugs.openjdk.java.net/browse/JDK-8071929
>
> patch : http://cr.openjdk.java.net/~rgoel/JDK_8071929/webrev.02/
>
> Fix is to remove obsolete country code "AN" and provide support for
> retrieving of ISO3166-1 alpha-2, ISO3166-1 alpha-3, ISO3166-3 country
> codes.
>
> Thanks,
> Rachna
>
More information about the i18n-dev
mailing list