Bug 147065

Summary: [javadoc] Method throwing subclass of RuntimeException requires Javadoc tag, even when already there
Product: [Eclipse Project] JDT Reporter: Nils Kilden-Pedersen <nilskp+eclipse>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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 ***