The poor-man's solution would be to detect common cases, with the
comment appearing before a package or import statement.
A more advanced solution would have to be in the lexer or parser,
detecting that there is a "unused" comment when creating a tree node.
-- Jon
On 8/24/21 8:07 AM, Pavel R
Just to clarify that example of mine. I didn't mean the package-info.java file.
I meant an ordinary file that comprises an interface, class, enum or record.
Perhaps a better example from Andrey's list would be this:
/**
* A utility package for the java(1), javaw(1) launchers.
* The
> On 24 Aug 2021, at 15:38, Jonathan Gibbons
> wrote:
>
> IIRC, the one in javadoc CommentUtils has recently been fixed.
>
> It might be worth a javac -Xlint option to detect/report such dangling
> comments.
How would you currently implement that? Aren't comments on non-documentable
construc
IIRC, the one in javadoc CommentUtils has recently been fixed.
It might be worth a javac -Xlint option to detect/report such dangling
comments.
-- Jon
On 8/23/21 11:50 PM, Andrey Turbanov wrote:
Hello.
I found a few internal classes in the JDK codebase which don't have
proper javadoc, but ha
On 24/08/2021 07:50, Andrey Turbanov wrote:
Hello.
I found a few internal classes in the JDK codebase which don't have
proper javadoc, but have dangling javadoc-like comments.
Dangling Javadoc comments are ignored by the javadoc tool and IDE.
Perhaps it was intentional to not add proper javadoc t
Hello.
I found a few internal classes in the JDK codebase which don't have
proper javadoc, but have dangling javadoc-like comments.
Dangling Javadoc comments are ignored by the javadoc tool and IDE.
Perhaps it was intentional to not add proper javadoc to them?
I believe it's better to convert them