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:

/**
 * @file ProcessJson.java
 * @author Tim Sloane
 * @date 2017-05-09
 */

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.

/**
 * Description of the class goes here.
 * 
 * @author Tim Sloane
 */
public class ProcessJson {

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