Community
Participate
Working Groups
For this code when I try to put in javadoc mentioning a method taking a generic typed parameter an error is given about the type - this is given both when generated from a method selection. The message given is "Javadoc: The method process(Object) in the type Test2 is not applicable for the arguments (S)" Either the reference that is inserted when I choose it should be process (Object) or there is a problem with parsing of javadoc references. Here's the snippet that caused the problem. % cat Test2.java /** * Comment * @param <S> the type this is for */ public abstract class Test2<S> { /** * Process the ip * @param ip */ public void process(S ip) { assert ip != null; } } class SubTest2<S> extends Test2<S> { // This is what is given by the quickfix after entering {@link Test2#pro /** Calls {@link Test2#process(S)}. **/ public void foo() { } // This is okay ?? /** Calls {@link Test2#process(Object)}. **/ public void bar() { } }
This is not quickfix but code assist which complete the code after Test2#pro... Currently code assist in Javadoc comments is handled by JDT/Text => move to this component. Note: Parse of Javadoc is correct and matches javadoc.exe behavior which returns a similar error on this reference: D:\usr\OTI\workspaces\tests\bugs\Divers15\b87868\SubTest.java:5: warning - Tag @link: can't find process(S) in Test
*** Bug 87869 has been marked as a duplicate of this bug. ***
Created attachment 18881 [details] Code snippet with erroneous errors given. Notice how it's not possible to come up with a javadoc version that is correct (from Eclipses perspective)
Updated with a code snippet that shows other cases that are dealt with incorrectly (even when you set to what javadoc accepts).
*** Bug 90573 has been marked as a duplicate of this bug. ***
*** Bug 97316 has been marked as a duplicate of this bug. ***
*** Bug 89186 has been marked as a duplicate of this bug. ***
Moving due to change of component ownership.
*** Bug 102735 has been marked as a duplicate of this bug. ***
Fixed and released in HEAD. Test case added in JavadocBugsCompletionModelTest.
Verified for 3.2 M3 using build I20051031-0010
Due to the correction of bug 209936, the test case corresponding to this bug had to be modified. See bug 209936 and also bug 80257 for details. All references to generic types in Javadocs should in fact have *raw* bindings. So we assume CA won't display proposals with generics when activated from within a Javadoc: won't propose process(S) but will propose process(Object)