RFR: JDK-8075778: Add javadoc tag to avoid duplication of return information in simple situations. [v6]

Jan Lahoda jlahoda at openjdk.java.net
Tue Dec 8 20:34:45 UTC 2020


On Tue, 8 Dec 2020 19:21:10 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> test/langtools/jdk/internal/shellsupport/doc/JavadocFormatterTest.java line 140:
>> 
>>> 138:                    "1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234\n" +
>>> 139:                    "1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234\n" +
>>> 140:                    "1234 1234 1234 1234 1234 1234 1234 1234 1234 \n";
>> 
>> What's that about? I mean is it related to this work on `{@return}`?
>
> It was needed to fix a test failure

FWIW, I believe the reason is that JavadocFormatter.scan (around line 580 in the new code) is checking for inline tags using the instanceof operator, and adds a space for inline tags. We could add a test to prevent that (i.e. not add the space , but not sure if there is a real problem with generating the space.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1355


More information about the compiler-dev mailing list