Community
Participate
Working Groups
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.)
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
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; } }
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 ***