Bug 252088 - Incorrect Javadoc warnings
Summary: Incorrect Javadoc warnings
Status: VERIFIED DUPLICATE of bug 222900
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-25 10:29 EDT by Dave Wichers CLA
Modified: 2008-12-09 13:56 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Wichers CLA 2008-10-25 10:29:09 EDT
Build ID: M20080911-1700

Steps To Reproduce:
Using the Javadoc warnings feature in Eclipse I'm running into two situations where I'm getting warnings that I don't think are appropriate.

#1) Use of @see tag with (non-Javadoc)

We are using this pattern:

    /* (non-Javadoc)
     * @see org.owasp.esapi.LogFactory#getLogger(java.lang.String)
     */
    public Logger getLogger(String moduleName) {

To pull in the javadoc from the interface that this method is implementing. Javadoc itself supports this just fine, but the javadoc warning tool in Eclipse warns that we are missing the Javadocs for this method.

We could declare the javadoc like this:

    /**
     * @see org.owasp.esapi.LogFactory#getLogger(java.lang.String)
     */
    public Logger getLogger(String moduleName) {

And the warning would go away, but the generated Javadoc is different and we prefer what is generated using the 1st pattern.

#2) Style for documenting parameter descriptions:

We use this pattern because it easier to read (we think):

    /**
     * Log a fatal event if 'fatal' level logging is enabled.
     * 
     * @param type
     *              the type of event
     * @param message
     *              the message to log
     */
void fatal(EventType type, String message);

The javadoc warning tool in Eclipse warns that we haven't provided the description for each of these parameters, but we have, they are just on the line after. Again, javadoc itself builds the javadoc just fine like this and we would prefer not to have conform to the expected style just to get the Javadoc warning to go away.

More information:
In conclusion: Is there a way to get this fixed? I think these would be very easy fixes. Since the generated javadoc works fine for both, seems like the warning tool should recognize them as valid too.
Comment 1 Frederic Fusier CLA 2008-10-25 11:49:23 EDT
It's not a good idea to open 1 bug for 2 issues, it's harder to follow progress on each of them.

However, I do not think we can do anything for the first issue. The compiler does parse only javadoc comments and I'm afraid that, for performance issue, there won't be any plan to change this behavior (see the old bug 44300 I opened several years ago...)

The second issue is a duplicate of bug 222900 and is fixed since 3.5M2. Note that it won't be backported in 3.4.2 as the fix was too risky. The simple workaround is to use the default value 'Validate @return tag' for the 'Missing tag description' preference.


*** This bug has been marked as a duplicate of bug 222900 ***
Comment 2 Frederic Fusier CLA 2008-10-25 11:50:00 EDT
Reopen to assign.
Comment 3 Frederic Fusier CLA 2008-10-25 11:50:35 EDT
.

*** This bug has been marked as a duplicate of bug 222900 ***
Comment 4 Kent Johnson CLA 2008-12-09 13:56:39 EST
Verified for 3.5M4 using I20081209-0100