[jboss-dev-forums] [Design the new POJO MicroContainer] - Generics again
adrian@jboss.org
do-not-reply at jboss.com
Thu Mar 20 10:57:56 EDT 2008
Ales, I still don't think you've groked generics.
Like I said before, generics is not a way to avoid having to write a cast.
Its for telling the compiler what you are doing.
I just upgraded to your latest test code in jboss-reflect which uses generics
yet there are 60 errors due to "unsafe type usage".
Something is very wrong.
Try using eclipse (with all the generics warnings turned on)
if you can't get IDEA to run -XLint from the JDK compiler.
That way you'll learn how to correctly use generics.
For now I've just added
@SuppressWarnings("unchecked")
which should really only be used when the generics are a good idea
but you can't actually use them, e.g. because reflection/serialization looses the type.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138070#4138070
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138070
More information about the jboss-dev-forums
mailing list