Posted by forax
on November 4, 2008 at 6:49 AM PST
We live in a post-generics world,
recently, October 30th, 2008,
has reach its
End Of Service Life .
I think it's a coincidence but Maurizio Cimadamore
decide to introduce
a long requested feature in javac ,
it now emit a warning for all usages of raw types
(a parameterized type without '<>').
And frankly, we (all Java developers) seem not ready for that.
To take an example, just after putback that change into jdk
workspace, the Xlint:rawtypes
was disable by default when the JDK is compiled
6753718 ) because it generates too many warnings.
Only JMX Team takes time to
browse its workspace and remove all raw types
bug 6763639 .
Though we was warned by the JLS (4.8)
The use of raw types is allowed only as a concession
to compatibility of legacy code.
The use of raw types in code written after the introduction of genericity
into the Java programming language is strongly discouraged.
It is possible that future versions of the Java programming language
will disallow the use of raw types
we are not ready :(
So why should we remove those warnings. To prepare the future.
Lot of people whine (and i'm one of those) because
are not reify at runtime . But generics
can't be reified
until you're code contains raw types.
So to prepare the future, please fix all these raw type
warnings in your code.