RFR: JDK-8307184: Incorrect/inconsistent specification and implementation for Elements.getDocComment [v5]

Joe Darcy darcy at openjdk.org
Sun Aug 6 20:48:51 UTC 2023

On Fri, 4 Aug 2023 20:27:29 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> > General feedback: while the text is good at describing when non-newline characters are removed, it is less good at describing the treatment of newlines ... are they line-terminators or line-separators; how do such characters in the result of `getDocComment` relate to the characters in the source file? For example, does `getDocComment` "copy" the newline characters found in the source file or are they always normalized to `\n` ?
> Hmm. Does the precise handling of line terminators matter enough to specify?

PS FWIW, the javac implementation does normalize line terminators, test case added.


PR Comment: https://git.openjdk.org/jdk/pull/15062#issuecomment-1666963739

More information about the compiler-dev mailing list