# HG changeset patch # User mduigou # Date 1300392869 25200 # Node ID 7047ae9625425b9efc98b28f8f79b0f52308b5bb # Parent e658ae923d534b211342d716e20a080b4819acf3# Parent 99032bb1a2b90566ef47fc045b018c975609df69 Merge diff -r e658ae923d53 -r 7047ae962542 jdk/src/share/classes/java/util/Formatter.java --- a/jdk/src/share/classes/java/util/Formatter.java Thu Mar 17 13:13:08 2011 -0700 +++ b/jdk/src/share/classes/java/util/Formatter.java Thu Mar 17 13:14:29 2011 -0700 @@ -1401,10 +1401,9 @@ *
The number of digits in the result for the fractional part of * m or a is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is - * less than the number of digits which would appear after the decimal - * point in the string returned by {@link Float#toString(float)} or {@link - * Double#toString(double)} respectively, then the value will be rounded - * using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up + * less than the number of digits to the right of the decimal point then + * the value will be rounded using the + * {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * BigDecimal#toString()}. @@ -1463,12 +1462,11 @@ * more decimal digits representing the fractional part of m. * *
The number of digits in the result for the fractional part of - * m or a is equal to the precision. If the precision is not + * m or a is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is - * less than the number of digits which would appear after the decimal - * point in the string returned by {@link Float#toString(float)} or {@link - * Double#toString(double)} respectively, then the value will be rounded - * using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up + * less than the number of digits to the right of the decimal point + * then the value will be rounded using the + * {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * BigDecimal#toString()}. @@ -3585,7 +3583,7 @@ int scale = value.scale(); if (scale > prec) { - // more "scale" digits than the requested "precision + // more "scale" digits than the requested "precision" int compPrec = value.precision(); if (compPrec <= scale) { // case of 0.xxxxxx