Bug 82514 - [1.5][javadoc] Problem with generics in javadoc
Summary: [1.5][javadoc] Problem with generics in javadoc
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-10 16:49 EST by R Lenard CLA
Modified: 2005-02-14 12:19 EST (History)
0 users

See Also:


Attachments
Test case (631 bytes, text/plain)
2005-01-10 22:05 EST, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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