-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
8
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Mac OS
JDK8
A DESCRIPTION OF THE PROBLEM :
NumberFormatException while trying to parse negative number for "ar_AE" locale
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getInstance(locale);
format.parse("-100.00"); --> Throws Exception
[java] java.text.ParseException: Unparseable number: "-100.00"
[java] at java.text.NumberFormat.parse(NumberFormat.java:385) ~[?:1.8.0_392]
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getInstance(locale);
System.out.println(format.parse("-100.00"));
ACTUAL -
java.text.ParseException: Unparseable number: "-100.00"
---------- BEGIN SOURCE ----------
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getInstance(locale);
System.out.println(format.parse("-100.00"));
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Catch exception and use Double.parseDouble to parse the value when locale is "ar_AE"
FREQUENCY : always
Mac OS
JDK8
A DESCRIPTION OF THE PROBLEM :
NumberFormatException while trying to parse negative number for "ar_AE" locale
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getInstance(locale);
format.parse("-100.00"); --> Throws Exception
[java] java.text.ParseException: Unparseable number: "-100.00"
[java] at java.text.NumberFormat.parse(NumberFormat.java:385) ~[?:1.8.0_392]
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getInstance(locale);
System.out.println(format.parse("-100.00"));
ACTUAL -
java.text.ParseException: Unparseable number: "-100.00"
---------- BEGIN SOURCE ----------
Locale locale = new Locale("ar", "AE");
NumberFormat format = NumberFormat.getInstance(locale);
System.out.println(format.parse("-100.00"));
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Catch exception and use Double.parseDouble to parse the value when locale is "ar_AE"
FREQUENCY : always