Bug 80257

Summary: [1.5][javadoc][dom] Type references in javadocs should have generic binding, not raw
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: eric_jodet, martinae
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2004-12-06 08:30:48 EST
I20041201-1139

Type references in javadocs should have a generic binding, not a raw one. In the
example below, List in {@link java.util.List} should resolve to an ITypeBinding
whose isGenericType() is true (currently: isRaw() is true). That would be in
line with the type binding for the references in the import statement, which is
also a "general reference" to List.

package p;
import java.util.List;
class A {
	/**
	 * @return a {@link java.util.List}
	 */
	List<String> getList() {
		return null;
	}
}
Comment 1 Frederic Fusier CLA 2005-01-26 18:33:46 EST
Fixed.

Now List resolve to a generic type ITypeBinding.

[jdt-core-internal]
Changes done in internalResolveType(Scope) method of JavadocSingleTypeReference
and JavadocQualifiedTypeReference.
Test case #testBug80257 added in ASTConverterJavadocTest.
Comment 2 David Audel CLA 2005-02-15 05:30:20 EST
Verified in I20050214-0927 for 3.1M5
Comment 3 Markus Keller CLA 2007-12-06 10:55:46 EST
Bug 83127 showed that all references to generic types in Javadocs should in fact have *raw* bindings. This includes type references.

Eric told me he would like to release a patch for bug 209936 which reverts the effects of the fix for this bug. I now agree with that. It looks like I didn't completely understand how the Javadoc tools works when I wrote comment 0.
Comment 4 Eric Jodet CLA 2007-12-07 00:33:42 EST
(In reply to comment #3)
While implementing the fix for bug 209936, modified the following test case (initially added while fixing this one) in order to conform with the new behavior (all references to generic types in Javadocs will in fact have *raw* bindings):

org.eclipse.jdt.core.tests.model
ASTConverterJavadocTest#testBug80257()