Details
Description
In Java 1.4.2 and earlier, BigDecimal's toString() does not use scientific notation. In Java 1.5, this changed so that toString() may or may not use scientific notation. This breaks validation of BigDecimals (both totalDigits and pattern facets). To fix this, I have introduced a new method that uses reflection and for Java 1.5 calls toPlainString() and for Java 1.4.2 and earlier calls toString(). The method is found statically at class load time to avoid a performance penalty.