--- old/src/share/classes/sun/misc/FormattedFloatingDecimal.java 2011-12-23 10:47:14.149772765 -0800 +++ new/src/share/classes/sun/misc/FormattedFloatingDecimal.java 2011-12-23 10:47:13.983285299 -0800 @@ -1017,7 +1017,15 @@ precision--; } else { form = Form.DECIMAL_FLOAT; - precision = precision - exp; + if (digits.length == 1 && digits[0] == '0' + && precision == 1) { + // When the number is zero and precision is 1, set the + // precision to 0 so that a decimal point and digits + // are not added by code later in this method. + precision--; + } else { + precision = precision - exp; + } } break; default: