Closed GoogleCodeExporter closed 9 years ago
Original comment by steven.b...@gmail.com
on 28 Mar 2013 at 1:34
I have not run into this before so I wrote a couple of simple tests to
demonstrate the behavior which I provide here for anyone else who might stumble
on this issue. Interesting!
@Test(expected = NumberFormatException.class)
public void testDecimalLocale() throws Exception {
String s = String.format(new Locale("ru"), "%f", 3.1415d);
System.out.println(s);
Double.parseDouble(s);
}
@Test
public void testDecimalLocaleRoot() throws Exception {
String s = String.format(Locale.ROOT, "%f", 3.1415d);
System.out.println(s);
double d = Double.parseDouble(s);
System.out.println(d);
}
Original comment by phi...@ogren.info
on 28 Mar 2013 at 7:58
Fixed in rev e7bab68d8686370480dffd33d7e54c1cb6ece8d8.
Alex, the patch looked just fine. Many thanks!
Original comment by phi...@ogren.info
on 28 Mar 2013 at 8:04
Original issue reported on code.google.com by
alexey.v...@gmail.com
on 26 Mar 2013 at 1:28Attachments: