RFR: 8283041: [javadoc] Crashes using {@return} with @param
Jonathan Gibbons
jjg at openjdk.java.net
Fri Mar 11 16:06:39 UTC 2022
On Fri, 11 Mar 2022 15:58:42 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Checker.java line 988:
>>
>>> 986: if (tree.isInline()) {
>>> 987: DocCommentTree dct = getCurrentPath().getDocComment();
>>> 988: if (dct.getFullBody().isEmpty() || tree != dct.getFullBody().get(0)) {
>>
>> It should not be necessary to resort to `getFullBody`. It should be enough to check the first sentence, but that check should not throw an exception.
>
> I thought that getting the first sentence would unnecessarily trigger sentence segmentation and read less clearly. But I can revert it if you like.
The split happens when the tree is created. See `DocTreeMaker` line 198.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7788
More information about the javadoc-dev
mailing list