Bug 119238 - [1.5][compiler] Unchecked generic type operation warning if access to static field of parameterized type
Summary: [1.5][compiler] Unchecked generic type operation warning if access to static ...
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 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-05 08:36 EST by Benno Baumgartner CLA
Modified: 2006-03-27 11:26 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Baumgartner CLA 2005-12-05 08:36:46 EST
Version: 3.2.0
Build id: I20051130-1215

Having:

package test1;
public class E1<T> {
	public static int I;
	public void foo() {
		E1.I= 10;
	}
}

And setting 'Unchecked generic type operation' to warning. I get the warning:

Type safety: The field I from the raw type E1 is assigned a value of type int. References to generic type E1<T> should be parameterized.

But I is a static field and a type paremeter is not required/possible.
Comment 1 Philipe Mulet CLA 2006-02-28 08:39:50 EST
reproduced in latest
Comment 2 Philipe Mulet CLA 2006-02-28 08:43:33 EST
Added GenericTypeTest#test930. 
Indeed static fields shouldn't be issuing such diagnostics.

Fixed
Comment 3 Philipe Mulet CLA 2006-02-28 08:43:45 EST
Fixed
Comment 4 David Audel CLA 2006-03-27 11:26:13 EST
Verified for 3.2 M6 using build I20060327-0010