Bug 145007 - [1.5][javadoc] Generics + Inner Class -> Javadoc "missing @throws" warning
Summary: [1.5][javadoc] Generics + Inner Class -> Javadoc "missing @throws" warning
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.2.1   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 147065 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-01 20:52 EDT by Sarah Gerweck CLA
Modified: 2006-09-11 13:35 EDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (6.17 KB, patch)
2006-06-16 09:00 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sarah Gerweck CLA 2006-06-01 20:52:34 EDT
If you turn on warnings for missing javadoc tags, the following code will erroneously say that you haven't added a tag for @throws MyException. 

To make this happen, you must have generics and both classes must be inner classes. The order doesn't matter.

It works just as poorly whether you have Test1 an interface or a class. Putting a javadoc comment on MyException doesn't help.

I'm using Eclipse 3.2RC6 (I20060526-0010)

class TestClass<T> {
    static class Test1 {
        /**
         * A simple method that demonstrates tag problems
         * 
         * @return a string
         * @throws MyException
         *             if something goes wrong
         */
        public String getString() throws MyException {
            throw new MyException();
        }
    }

    static class MyException extends Exception {
        private static final long serialVersionUID = 1L;
    }
}
Comment 1 Frederic Fusier CLA 2006-06-16 08:57:13 EDT
Need to use erasure while verifying Javadoc reference types @throws tags references...
Comment 2 Frederic Fusier CLA 2006-06-16 09:00:09 EDT
Created attachment 44630 [details]
Proposed patch
Comment 3 Frederic Fusier CLA 2006-06-16 09:00:47 EDT
Fix is trivial => perhaps may be backported in 3.2.1 stream
Comment 4 Frederic Fusier CLA 2006-06-17 06:39:43 EDT
*** Bug 147065 has been marked as a duplicate of this bug. ***
Comment 5 Frederic Fusier CLA 2006-06-21 04:52:23 EDT
Patch released for 3.3 M1 in HEAD stream
Comment 6 Frederic Fusier CLA 2006-06-22 06:22:59 EDT
Released for 3.2.1 in TARGET_321 branch
Comment 7 Frederic Fusier CLA 2006-08-04 12:14:50 EDT
Verified for 3.3 M1 using build I20060804-0010.
Comment 8 Olivier Thomann CLA 2006-09-11 13:35:34 EDT
Verified for 3.2.1 using build M20060908-1655.