From 59bd2b2ad601da406ef600615dac803de1f63891 Mon Sep 17 00:00:00 2001 From: smarks Date: Fri, 25 Oct 2013 14:53:34 -0700 Subject: [PATCH] 5063500: Formatter spec says "char" is not an integral type 7126305: Wrong Unicode value specified for format conversion character 'd' 8027287: incorrect example in Formatter javadoc Reviewed-by: rriggs, darcy, lancea --- src/share/classes/java/util/Formatter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/share/classes/java/util/Formatter.java b/src/share/classes/java/util/Formatter.java index a94234aee..7b6e1d1de 100644 --- a/src/share/classes/java/util/Formatter.java +++ b/src/share/classes/java/util/Formatter.java @@ -131,7 +131,7 @@ import sun.misc.FormattedFloatingDecimal; * import static java.util.Calendar.*; * * Calendar c = new GregorianCalendar(1995, MAY, 23); - * String s = String.format("Duke's Birthday: %1$tm %1$te,%1$tY", c); + * String s = String.format("Duke's Birthday: %1$tb %1$te, %1$tY", c); * // -> s == "Duke's Birthday: May 23, 1995" * * @@ -253,7 +253,7 @@ import sun.misc.FormattedFloatingDecimal; *
  • Integral - may be applied to Java integral types: {@code byte}, * {@link Byte}, {@code short}, {@link Short}, {@code int} and {@link * Integer}, {@code long}, {@link Long}, and {@link java.math.BigInteger - * BigInteger} + * BigInteger} (but not {@code char} or {@link Character}) * *
  • Floating Point - may be applied to Java floating-point types: * {@code float}, {@link Float}, {@code double}, {@link Double}, and {@link @@ -899,7 +899,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'd'} - * '\u0054' + * '\u0064' * Formats the argument as a decimal integer. The localization algorithm is applied. * @@ -1057,7 +1057,7 @@ import sun.misc.FormattedFloatingDecimal; * * *
    {@code 'd'} - * '\u0054' + * '\u0064' * Requires the output to be formatted as a decimal integer. The localization algorithm is applied. * -- GitLab