Bug 82514

Summary: [1.5][javadoc] Problem with generics in javadoc
Product: [Eclipse Project] JDT Reporter: R Lenard <rlenard>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Test case none

Description R Lenard CLA 2005-01-10 16:49:31 EST
For this code
% cat CUnitTest.java
package foo;

public final class CUnitTest
{
    /** Tests the method{@link ComparableUtils#compareTo(Object, Object, 
Class)} and
     *  {@link ComparableUtils#compareTo(Object, Object)}.
     */
    public void testCompareTo()
    {
    }
}

I get this error -
Missing code implementation in the compiler (at line 1).

If I remove the javadoc comment to the testCompareTo() method the error goes 
away.
Comment 1 R Lenard CLA 2005-01-10 16:54:39 EST
ComparableUtils.compareTo are generic methods.

   public static <T extends Comparable< ? super T>> int compareTo(final Object 
first, final Object firstPrime,
        final Class<T> type) throws ClassCastException
    {
        return 0;
    }

and

    public static <X extends Comparable< ? super X>> int compareTo(final X 
first, final X firstPrime)
        throws ClassCastException
    {
        return 0;
    }
Comment 2 Olivier Thomann CLA 2005-01-10 22:05:57 EST
Created attachment 17066 [details]
Test case

Put a breakpoint in ProblemReporter.javadocInvalidMethod(MessageSend
messageSend, MethodBinding method, int modifiers).
Comment 3 Frederic Fusier CLA 2005-01-11 07:03:31 EST
Thanks Olivier for the test case.

Fixed.

Some of new 1.5 error messages were not implemented for Javadoc...

[jdt-core-internal]
Changes done in ProblemReporter javadocInvalidMethod, javadocInvalidConstructor
and computeSeverity methods. Also add corresponding new constants in IProblem.
Test case added in JavadocTest_1_5 (not duplicated in JavadocTest_1_4 and
JavadocTest_1_3 as there were no interest to get all compiler error on 1.5 code)
Comment 4 David Audel CLA 2005-02-14 12:19:19 EST
Verified in I20050209 + JDT Core v_536 for 3.1M5