Re: [11] RFR JDK-8196399, JDK-8199672: Formatting a decimal using locale-specific grouping..., ClassCastException is thrown...

2018-03-20 Thread Naoto Sato

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


[11] RFR JDK-8196399, JDK-8199672: Formatting a decimal using locale-specific grouping..., ClassCastException is thrown...

2018-03-20 Thread Nishit Jain

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