Bug 147065 - [javadoc] Method throwing subclass of RuntimeException requires Javadoc tag, even when already there
Summary: [javadoc] Method throwing subclass of RuntimeException requires Javadoc tag, ...
Status: RESOLVED DUPLICATE of bug 145007
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-14 10:49 EDT by Nils Kilden-Pedersen CLA
Modified: 2006-06-17 06:39 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Kilden-Pedersen CLA 2006-06-14 10:49:39 EDT
In my preferences, under Java->Compiler->Javadoc, I have "Missing Javadoc tags" set to "Warning". When I define a method that throws any subclass of RuntimeException, I get a warning "Javadoc: Missing tag for declared exception XXX", even though the tag is already there. 
If I choose the QuickFix "Add missing tag" it will continuously add the @throws tag over and over again.
BTW, this bug has been there for quite a while, I believe 3.1 also.

(I'm not sure what Bugzilla component this should be filed under. Nothing seem to match.)
Comment 1 Frederic Fusier CLA 2006-06-16 09:06:40 EDT
I cannot reproduce with following simple test case:
public class Test {
	/**
	 * @throws MyException
	 */
	public void foo() throws MyException {
	}
}
class MyException extends RuntimeException {}

Even with "Missing Javadoc tags" preference set to "Warning", I do not get any compiler warning.

Please provide your complete test case, build ID, compiler compliance settings, JDKs, etc.  and reopen when available, thanks
Comment 2 Nils Kilden-Pedersen CLA 2006-06-16 09:26:30 EDT
Ok, it seems to be a little more obscure than I originally thought. It seems to be related to a combination of inner classes and generics. This example gives me a warning:

public class MyClass<T> {
    public static final class MyRuntimeException extends RuntimeException {}
    /**
     * Some comment.
     * @throws MyRuntimeException 
     */
    public void myMethod() throws MyRuntimeException {
        return;
    }
}

Comment 3 Frederic Fusier CLA 2006-06-17 06:39:43 EDT
Thanks for the feedback. Obviously a duplicate of bug 145007, nothing to deal with RuntimeException but just a verification which fails with generics...


*** This bug has been marked as a duplicate of 145007 ***