RFR: JDK-8307184: Incorrect/inconsistent specification and implementation for Elements.getDocComment [v5]
Alex Buckley
alex.buckley at oracle.com
Fri Aug 4 21:14:52 UTC 2023
On 8/4/2023 1:33 PM, Joe Darcy wrote:
>> src/java.compiler/share/classes/javax/lang/model/util/Elements.java line 300:
>>
>>> 298: * if the lines start with <em>zero</em> or more white space characters followed by
>>> 299: * <em>one</em> or more "{@code *}" characters,
>>> 300: * those leading white space characters are discarded as are any
>>
>> FWIW, I checked `javac` and it allows form-feed in the leading whitespace characters
>>
>> As an adjective "white space" is normally a single word, at least in JDK.
>
> Hmm. java.lang.Character contains both "whitespace" and "white space" in its textual comments.
The JLS is careful to speak only of "white space" as a noun, never as an
adjective for "character". But I think that when the adjective is
needed, it's "whitespace". java.lang.Character follows this rule, e.g.,
"ISO control characters that are not whitespace" (i.e., are not
whitespace characters).
Alex
More information about the compiler-dev
mailing list