Bug 95521

Summary: [1.5][javadoc] validation with @see tag not working for generic method
Product: [Eclipse Project] JDT Reporter: Artur Brinkmann <artur.brinkmann>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: philippe.couton
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Artur Brinkmann CLA 2005-05-17 05:39:58 EDT
Using M7 (Build I20050513-1415)

The following code creates "missing tag for parameter" and "missing tag for
return type" warnings for the getStuff() method implementation, even though the
tags are there in the interface. If I change the method not to be generic by
removing the type parameter, the warning disappears.

// file test/IStuff.java

package test;
import java.util.List;
/** interface */
public interface IStuff {
    /**
     * @param <T>
     * @param stuffClass 
     * @return stuff
     */
    public <T extends Object> List<T> getStuff(Class<T> stuffClass);
}

// file test/MyStuff.java

package test;
import java.util.List;
/** test class */
public class MyStuff implements IStuff {
    /**
     * @see test.IStuff#getStuff(java.lang.Class)
     */
    public <T> List<T> getStuff(Class<T> stuffClass) {
        return null;
    }
}
Comment 1 Frederic Fusier CLA 2005-05-17 13:18:32 EDT
Fixed and release in HEAD.

Javadoc resolution used binding equality instead of compatibility. Change this
behavior to see if methods declaring class and parameters are compatible.

[jdt-core internal]
Changes done in Javdoc.resolve(MethodScope).

Test cases added in JavadocTest_1_5, JavadocTest_1_4 and JavadocTest_1_3
Comment 2 Frederic Fusier CLA 2005-05-25 09:17:44 EDT
*** Bug 96597 has been marked as a duplicate of this bug. ***
Comment 3 Olivier Thomann CLA 2005-05-27 10:17:16 EDT
Verified in I20050526-2000