@Deprecated
@Override
public String toString() {
- return String.format("%." + visibleDecimalDigitCount + "f", source);
+ return String.format(Locale.ROOT, "%." + visibleDecimalDigitCount + "f", source);
}
/**
PluralRules rulesJ1 = PluralRules.forLocale(Locale.FRANCE, PluralType.ORDINAL);
assertEquals("forLocale() with type", rulesU1, rulesJ1);
}
+
+ @Test
+ public void testBug20264() {
+ String expected = "1.23400";
+ FixedDecimal fd = new FixedDecimal(1.234, 5, 2);
+ assertEquals("FixedDecimal toString", expected, fd.toString());
+ Locale.setDefault(Locale.FRENCH);
+ assertEquals("FixedDecimal toString", expected, fd.toString());
+ Locale.setDefault(Locale.GERMAN);
+ assertEquals("FixedDecimal toString", expected, fd.toString());
+ }
}