Eclipse Helios – @SuppressWarnings “rawtypes” doesn't work while “unchecked” does-Collection of common programming errors
I have a problem with the @SuppressWarnings
annotation when handling raw-types warnings in Eclipse Helios.
According to this post and the docs, the annotation parameter rawtypes
should be used instead of the old unchecked
in Eclipse Helios. However, when I use the rawtypes
annotation, I get following warning:
Unhandled warning token rawtypes
Even when performing a quick-fix over a raw type, Eclipse suggests me to use rawtypes
. However, I have found out that the old unchecked
parameter still works in my version of Helios while rawtypes
doesn’t, which doesn’t conform to the docs.
So basically I have already “solved” this issue but the real question is why rawtypes
doesn’t work?
My Eclipse setup:
Version: Helios Service Release 2
Build id: 20110301-1815
Project setup:
Java Build Path > JRE System Library: jdk1.6.0_24
Java Compiler > JDK Compliance: 1.6
Java Compiler > Generated .class files compatibility: 1.6
Java Compiler > Source compatibility: 1.6
From eclipse.ini
:
-vm
c:/Program Files/Java/jdk1.6.0_24/bin
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
System:
Windows 7 Professional Service Pack 1
Any help or explanation will be much appreciated, thanks!