Bug 159245 - [1.5][compiler] Missing raw type usage warning for array type ref
Summary: [1.5][compiler] Missing raw type usage warning for array type ref
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-29 04:54 EDT by Philipe Mulet CLA
Modified: 2007-01-16 01:09 EST (History)
1 user (show)

See Also:


Attachments
Proposed patch (29.87 KB, patch)
2006-09-29 05:46 EDT, Philipe Mulet CLA
no flags Details | Diff

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