[11] RFR JDK-8196399, JDK-8199672: Formatting a decimal using locale-specific grouping..., ClassCastException is thrown...
Nishit Jain
nishit.jain at oracle.com
Tue Mar 20 17:37:26 UTC 2018
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 core-libs-dev
mailing list