Eclipse Ant Javadoc - warning of no comment on private field

40 views Asked by At

Running the Ant Javadoc process in Eclipse (2022-09 (4.25.0)) with <javadoc access="public"

Getting a handful of these warnings on private fields. However, there are many private fields that it does not complain about.

 [javadoc] D:\workspace_12\...\NetConfCredential.java:47: warning: no comment
 [javadoc]  private boolean verified = false;

It should be ignoring all private fields, no? It does not complain about all of the private methods that do not have javadoc.

===================== While minimizing the code to post an example, I found that it has to do with java.io.Serializable.

public abstract class TestAbstract implements java.io.Serializable
{
        /** Our serialization ID */
    public static final long serialVersionUID = 12;
}

/**
 * Comment.
 */
public class TestCredential extends TestAbstract
{
        /** UID */
    public static final long serialVersionUID = 12;

    private static final String defaultString = "public";

    private boolean verified = false;

    /**
    * Constructor
    */
    public TestCredential() {   }
}

 [javadoc] D:\workspace_12\...\TestCredential.java:13: warning: no comment
 [javadoc]  private boolean verified = false;
 [javadoc]  

            ^

Remove Serializable from the superclass and the warning goes away. Javadoc does not warn about the private static field.

========================

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="javadoc">
    <target name="javadoc">
        <javadoc access="public" author="false"  
            destdir="d:..." doctitle="NMS Core" classpath="..."
            noqualifier="all" nodeprecated="true" nodeprecatedlist="true" noindex="false" nonavbar="false" notree="false" 
            Public="true"

            sourcefiles="
            com\logikos\core\credentials\TestCredential.java
            "
            
        source="12" splitindex="false" use="false" version="false"/>
    </target>
            
            
</project>

     [javadoc] Standard Doclet version 17.0.5+8
0

There are 0 answers