RFR: minor doc fixes for java.util.Formatter

Lance Andersen - Oracle Lance.Andersen at oracle.com
Fri Oct 25 21:02:22 UTC 2013


+1
On Oct 25, 2013, at 4:50 PM, Stuart Marks wrote:

> Hi all,
> 
> Please review a few minor javadoc fixes in java.util.Formatter. Links to bugs are:
> 
> https://bugs.openjdk.java.net/browse/JDK-5063500
> https://bugs.openjdk.java.net/browse/JDK-7126305
> https://bugs.openjdk.java.net/browse/JDK-8027287
> 
> The fixes are all one-liners so I've just appended the patch below.
> 
> This obviously isn't a high priority but I wanted something easy to do on a Friday. :-) Thanks to Joe Bowbeer for pointing out JDK-8027287.
> 
> s'marks
> 
> 
> 
> 
> 
> # HG changeset patch
> # User smarks
> # Date 1382732684 25200
> # Node ID 5bd0c1de275f8f779bf7a4ac5be035ffe2a161f1
> # Parent  1153022c0a453ee2e31f4c7572d2d2522674a096
> 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: XXX
> 
> diff -r 1153022c0a45 -r 5bd0c1de275f src/share/classes/java/util/Formatter.java
> --- a/src/share/classes/java/util/Formatter.java	Fri Oct 25 13:01:11 2013 +0200
> +++ b/src/share/classes/java/util/Formatter.java	Fri Oct 25 13:24:44 2013 -0700
> @@ -131,7 +131,7 @@
>  *   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"
>  * </pre></blockquote>
>  *
> @@ -253,7 +253,7 @@
>  * <li> <b>Integral</b> - 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})
>  *
>  * <li><b>Floating Point</b> - may be applied to Java floating-point types:
>  * {@code float}, {@link Float}, {@code double}, {@link Double}, and {@link
> @@ -899,7 +899,7 @@
>  * <table cellpadding=5 summary="IntConv">
>  *
>  * <tr><td valign="top"> {@code 'd'}
> - *     <td valign="top"> <tt>'\u0054'</tt>
> + *     <td valign="top"> <tt>'\u0064'</tt>
>  *     <td> Formats the argument as a decimal integer. The <a
>  *     href="#L10nAlgorithm">localization algorithm</a> is applied.
>  *
> @@ -1057,7 +1057,7 @@
>  * <table cellpadding=5 summary="BIntConv">
>  *
>  * <tr><td valign="top"> {@code 'd'}
> - *     <td valign="top"> <tt>'\u0054'</tt>
> + *     <td valign="top"> <tt>'\u0064'</tt>
>  *     <td> Requires the output to be formatted as a decimal integer. The <a
>  *     href="#L10nAlgorithm">localization algorithm</a> is applied.
>  *

-------------- next part --------------

Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com



More information about the core-libs-dev mailing list