JDK 13 RFR of JDK-8224783: Javadoc of String strip methods uses link where linkplain would be better

Joe Darcy joe.darcy at oracle.com
Tue May 28 17:42:58 UTC 2019


Hello,

Double-checking the changes, I found a few more instances of "white 
space" in a code markup that I'll change to plain text as part of the 
fix; several edits of

     {@link Character#isWhitespace(int) white space characters}

to

      {@linkplain Character#isWhitespace(int) white space characters}

Additional patch:

@@ -2849,10 +2849,10 @@
       * beginning of each line.
       * <p>
       * If {@code n < 0} then up to {@code n}
-     * {@link Character#isWhitespace(int) white space characters} are 
removed
+     * {@linkplain Character#isWhitespace(int) white space characters} 
are removed
       * from the beginning of each line. If a given line does not contain
       * sufficient white space then all leading
-     * {@link Character#isWhitespace(int) white space characters} are 
removed.
+     * {@linkplain Character#isWhitespace(int) white space characters} 
are removed.
       * Each white space character is treated as a single character. In
       * particular, the tab character {@code "\t"} (U+0009) is considered a
       * single character; it is not expanded.
@@ -2861,7 +2861,7 @@
       * terminators are still normalized.
       *
       * @param n  number of leading
-     *           {@link Character#isWhitespace(int) white space characters}
+     *           {@linkplain Character#isWhitespace(int) white space 
characters}
       *           to add or remove
       *
       * @return string with indentation adjusted and line endings 
normalized

Thanks,

-Joe

On 5/27/2019 6:12 AM, Jim Laskey wrote:
> +1
>
>> On May 24, 2019, at 10:15 PM, Joe Darcy <joe.darcy at oracle.com> wrote:
>>
>> Hello,
>>
>> Please review the patch below to address:
>>
>>      JDK-8224783: Javadoc of String strip methods uses link where linkplain would be better
>>
>> Thanks,
>>
>> -Joe
>>
>> diff -r 4947a097db60 src/java.base/share/classes/java/lang/String.java
>> --- a/src/java.base/share/classes/java/lang/String.java    Fri May 24 15:06:58 2019 -0400
>> +++ b/src/java.base/share/classes/java/lang/String.java    Fri May 24 18:14:28 2019 -0700
>> @@ -2690,21 +2690,21 @@
>>
>>       /**
>>        * Returns a string whose value is this string, with all leading
>> -     * and trailing {@link Character#isWhitespace(int) white space}
>> +     * and trailing {@linkplain Character#isWhitespace(int) white space}
>>        * removed.
>>        * <p>
>>        * If this {@code String} object represents an empty string,
>>        * or if all code points in this string are
>> -     * {@link Character#isWhitespace(int) white space}, then an empty string
>> +     * {@linkplain Character#isWhitespace(int) white space}, then an empty string
>>        * is returned.
>>        * <p>
>>        * Otherwise, returns a substring of this string beginning with the first
>> -     * code point that is not a {@link Character#isWhitespace(int) white space}
>> +     * code point that is not a {@linkplain Character#isWhitespace(int) white space}
>>        * up to and including the last code point that is not a
>> -     * {@link Character#isWhitespace(int) white space}.
>> +     * {@linkplain Character#isWhitespace(int) white space}.
>>        * <p>
>>        * This method may be used to strip
>> -     * {@link Character#isWhitespace(int) white space} from
>> +     * {@linkplain Character#isWhitespace(int) white space} from
>>        * the beginning and end of a string.
>>        *
>>        * @return  a string whose value is this string, with all leading
>> @@ -2722,19 +2722,19 @@
>>
>>       /**
>>        * Returns a string whose value is this string, with all leading
>> -     * {@link Character#isWhitespace(int) white space} removed.
>> +     * {@linkplain Character#isWhitespace(int) white space} removed.
>>        * <p>
>>        * If this {@code String} object represents an empty string,
>>        * or if all code points in this string are
>> -     * {@link Character#isWhitespace(int) white space}, then an empty string
>> +     * {@linkplain Character#isWhitespace(int) white space}, then an empty string
>>        * is returned.
>>        * <p>
>>        * Otherwise, returns a substring of this string beginning with the first
>> -     * code point that is not a {@link Character#isWhitespace(int) white space}
>> +     * code point that is not a {@linkplain Character#isWhitespace(int) white space}
>>        * up to and including the last code point of this string.
>>        * <p>
>>        * This method may be used to trim
>> -     * {@link Character#isWhitespace(int) white space} from
>> +     * {@linkplain Character#isWhitespace(int) white space} from
>>        * the beginning of a string.
>>        *
>>        * @return  a string whose value is this string, with all leading white
>> @@ -2752,19 +2752,19 @@
>>
>>       /**
>>        * Returns a string whose value is this string, with all trailing
>> -     * {@link Character#isWhitespace(int) white space} removed.
>> +     * {@linkplain Character#isWhitespace(int) white space} removed.
>>        * <p>
>>        * If this {@code String} object represents an empty string,
>>        * or if all characters in this string are
>> -     * {@link Character#isWhitespace(int) white space}, then an empty string
>> +     * {@linkplain Character#isWhitespace(int) white space}, then an empty string
>>        * is returned.
>>        * <p>
>>        * Otherwise, returns a substring of this string beginning with the first
>>        * code point of this string up to and including the last code point
>> -     * that is not a {@link Character#isWhitespace(int) white space}.
>> +     * that is not a {@linkplain Character#isWhitespace(int) white space}.
>>        * <p>
>>        * This method may be used to trim
>> -     * {@link Character#isWhitespace(int) white space} from
>> +     * {@linkplain Character#isWhitespace(int) white space} from
>>        * the end of a string.
>>        *
>>        * @return  a string whose value is this string, with all trailing white
>> @@ -2782,11 +2782,11 @@
>>
>>       /**
>>        * Returns {@code true} if the string is empty or contains only
>> -     * {@link Character#isWhitespace(int) white space} codepoints,
>> +     * {@linkplain Character#isWhitespace(int) white space} codepoints,
>>        * otherwise {@code false}.
>>        *
>>        * @return {@code true} if the string is empty or contains only
>> -     *         {@link Character#isWhitespace(int) white space} codepoints,
>> +     *         {@linkplain Character#isWhitespace(int) white space} codepoints,
>>        *         otherwise {@code false}
>>        *
>>        * @see Character#isWhitespace(int)
>>


More information about the core-libs-dev mailing list