6178739: (fmt) Formatter.format("%0.4f\n", 56789.456789) generates MissingFormatWidthException

Change the field width specification to require a positive value. The exception is still thrown but that is now explicitly consistent with the specification.

Reviewed-by: darcy
This commit is contained in:
Brian Burkhalter 2013-07-09 11:26:25 -07:00 committed by Brian Burkhalter
parent 20cc00ce2b
commit 7816fc6dde

View File

@ -190,7 +190,7 @@ import sun.misc.FormattedFloatingDecimal;
* <p> The optional <i>flags</i> is a set of characters that modify the output
* format. The set of valid flags depends on the conversion.
*
* <p> The optional <i>width</i> is a non-negative decimal integer indicating
* <p> The optional <i>width</i> is a positive decimal integer indicating
* the minimum number of characters to be written to the output.
*
* <p> The optional <i>precision</i> is a non-negative decimal integer usually