changeset 7653:607fa1ff3de2

6178739: (fmt) Formatter.format("%0.4f\n", 56789.456789) generates MissingFormatWidthException Summary: 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 Contributed-by: Brian Burkhalter <brian.burkhalter@oracle.com>
author bpb
date Tue, 09 Jul 2013 11:26:25 -0700
parents 7c44ea602cc8
children 2ee772cda1d6
files src/share/classes/java/util/Formatter.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/Formatter.java	Wed Jul 10 11:05:39 2013 -0700
+++ b/src/share/classes/java/util/Formatter.java	Tue Jul 09 11:26:25 2013 -0700
@@ -190,7 +190,7 @@
  * <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