<i18n dev> [11] RFR JDK-8196399, JDK-8199672: Formatting a decimal using locale-specific grouping..., ClassCastException is thrown...
Naoto Sato
naoto.sato at oracle.com
Tue Mar 20 17:58:43 UTC 2018
Looks good to me.
Naoto
On 3/20/18 10:37 AM, Nishit Jain wrote:
> Hi,
>
> Please review the fix for JDK-8196399 & JDK-8199672
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8196399
> https://bugs.openjdk.java.net/browse/JDK-8199672
> Webrev: http://cr.openjdk.java.net/~nishjain/8196399_8199672/webrev.01/
>
> Issue:
> 8196399: Locales such as hy_AM do not use grouping, but specify a
> grouping separator. Formatter throws ArithmeticException / by zero while
> identifying the position, as the grouping size is zero.
> 8199672: Unconditional casting of NumberFormat instance to DecimalFormat
>
> Fix:
> 8196399: Reset the grouping separator to null character, so that
> grouping separator position identification is skipped.
> 8199672: Check if the instance returned is DecimalFormat; else, use
> DecimalFormat constructor to obtain the instance.
>
>
> Regards,
> Nishit Jain
More information about the i18n-dev
mailing list