Skip to content
Advertisement

Why does IntelliJ IDEA give a warning that this file javadoc is dangling?

I’m using IntelliJ IDEA and I tried to add a Javadoc comment at the top of the file like this:

JavaScript

But IntelliJ gives me the warning “Dangling Javadoc comment.” What makes this comment dangling? I thought because it’s tagged with @file, it should be at the start of the file.

Advertisement

Answer

Javadoc has no @file or @date tags. You should be tagging the class, instead.

JavaScript

See:

http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html

Advertisement