Bug 159245

Summary: [1.5][compiler] Missing raw type usage warning for array type ref
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Ed.Merks
Version: 3.2   
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Philipe Mulet CLA 2006-09-29 04:54:58 EDT
Build 3.2M2

The compiler doesn't flag array type references to raw types as "raw type usage" as it should.

e.g.
public class X<T> {
	{
		X rawx = null;
		X[] rawxs = { rawx };
		System.out.println(rawxs.length);
	}
}

There should be a warning against "X[]".
Comment 1 Philipe Mulet CLA 2006-09-29 05:43:43 EDT
Released for 3.3M3.
Should backport to 3.2.2.
Comment 2 Philipe Mulet CLA 2006-09-29 05:46:20 EDT
Created attachment 51157 [details]
Proposed patch

Patch released to HEAD (3.3M3).
It contains a bit more changes than just missing raw type warning; for improving location of (single) array type references.
Comment 3 Philipe Mulet CLA 2006-09-29 06:34:24 EDT
Entire patch should be backported.
Comment 4 Olivier Thomann CLA 2006-09-29 14:10:23 EDT
Added org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest#test1041
Comment 5 Olivier Thomann CLA 2006-09-29 14:33:09 EDT
Updated existing tests:
org.eclipse.jdt.core.tests.compiler.regression.AnnotationTest
org.eclipse.jdt.core.tests.compiler.regression.Compliance_1_5
org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest
org.eclipse.jdt.core.tests.compiler.regression.GenericTypeTest
org.eclipse.jdt.core.tests.compiler.regression.VarArgsTest
Comment 6 Olivier Thomann CLA 2006-09-29 14:35:04 EDT
Released for 3.3M3
Comment 7 Olivier Thomann CLA 2006-09-29 22:25:15 EDT
Released for 3.3M3.
Released for 3.2.2.
Comment 8 David Audel CLA 2006-10-30 06:47:28 EST
Verified for 3.3 M3 using build I20061030-0010
Comment 9 Maxime Daniel CLA 2007-01-16 01:09:57 EST
Verified for 3.2.2 using build M20070112-1200.