RFR: 5035569: assertion error in Formatter

Brian Burkhalter brian.burkhalter at oracle.com
Fri Feb 1 18:59:47 UTC 2013


Hello,

The assertion is due to a condition occurring which is contrary to the specification. The specification is accurate but insufficiently forthcoming that the %a conversion is unsupported for BigDecimal. This change clarifies the situation by updating the conversion table which occurs earlier in the class comments.

diff -r d2495b9984fa -r 4770eaa01d38 src/share/classes/java/util/Formatter.java
--- a/src/share/classes/java/util/Formatter.java	Fri Feb 01 07:39:41 2013 +0800
+++ b/src/share/classes/java/util/Formatter.java	Fri Feb 01 10:46:23 2013 -0800
@@ -351,7 +351,9 @@
  * <tr><td valign="top">{@code 'a'}, {@code 'A'}
  *     <td valign="top"> floating point
  *     <td> The result is formatted as a hexadecimal floating-point number with
- *     a significand and an exponent
+ *     a significand and an exponent. This conversion is <b>not</b> supported
+ *     for the {@code BigDecimal} type despite the latter's being in the
+ *     <i>floating point</i> argument category.
  *
  * <tr><td valign="top">{@code 't'}, {@code 'T'}
  *     <td valign="top"> date/time

Thanks,

Brian


More information about the core-libs-dev mailing list