JDK 9 RFR(xs): 8180128: small errors in String javadoc
Lance Andersen
lance.andersen at oracle.com
Wed May 10 22:04:35 UTC 2017
Looks fine Stuart
> On May 10, 2017, at 6:02 PM, Stuart Marks <stuart.marks at oracle.com> wrote:
>
> Hi all,
>
> Please review a couple really small fixes to the String javadoc.
>
> 1) The String(byte[], int, int, int) constructor refers to converting bytes to chars as specified "in the method above" except that the method "above" has never converted bytes to chars as far as I can see. It really should refer to the String(byte[], int) constructor.
>
> 2) Missing space in the spec for the String(byte[], int) constructor.
>
> Bug link: https://bugs.openjdk.java.net/browse/JDK-8180128
>
> Diff below.
>
> Thanks,
>
> s'marks
>
>
> # HG changeset patch
> # User smarks
> # Date 1494453313 25200
> # Wed May 10 14:55:13 2017 -0700
> # Node ID 89a0a00be57bf543c4304e0a536bbb3fc5fda95a
> # Parent ca5d05dc27dd5912abc14655e637ed62ce3fe505
> 8180128: small errors in String javadoc
> Reviewed-by: XXX
>
> diff -r ca5d05dc27dd -r 89a0a00be57b src/java.base/share/classes/java/lang/String.java
> --- a/src/java.base/share/classes/java/lang/String.java Sun May 07 19:01:13 2017 -0700
> +++ b/src/java.base/share/classes/java/lang/String.java Wed May 10 14:55:13 2017 -0700
> @@ -335,7 +335,7 @@
> * subarray.
> *
> * <p> Each {@code byte} in the subarray is converted to a {@code char} as
> - * specified in the method above.
> + * specified in the {@link #String(byte[],int) String(byte[],int)} constructor.
> *
> * @deprecated This method does not properly convert bytes into characters.
> * As of JDK 1.1, the preferred way to do this is via the
> @@ -390,7 +390,7 @@
>
> /**
> * Allocates a new {@code String} containing characters constructed from
> - * an array of 8-bit integer values. Each character <i>c</i>in the
> + * an array of 8-bit integer values. Each character <i>c</i> in the
> * resulting string is constructed from the corresponding component
> * <i>b</i> in the byte array such that:
> *
>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
<http://oracle.com/us/design/oracle-email-sig-198324.gif>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 <mailto:Lance.Andersen at oracle.com>
More information about the core-libs-dev
mailing list