java-tools / fixedformat4j

Automatically exported from code.google.com/p/fixedformat4j
0 stars 0 forks source link

AbstractDecimalFormatter DecimalFormat usage is not thread-safe #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
AbstractDecimalFormatter.FORMATTER is a static reference to a "known to be non 
thread-safe" class and then uses without synchronization.

Possible hideous side-effects may surface from this :-(

Original issue reported on code.google.com by per.ole...@gmail.com on 14 Dec 2010 at 11:57

GoogleCodeExporter commented 9 years ago
Part of the fix on rounding in AbstractNumberFormatter moved the construction 
of DecimalFormat down into asString as a local variable. Should be safe now.

Original comment by per.ole...@gmail.com on 14 Dec 2010 at 3:16