Well, one workaround is to use a return type rather than a cast, which is valid, e.g.:
|
| Cache<Object, Object> myCache = getCache();
| Cache injected;
|
| private Cache<Object, Object> getCache()
| {
| return injected;
| }
|
|
But that's just an ugly workaround to prevent ugly compiler warnings. One of the
things we need to deal with until DI containers start supporting generics better, I
suppose (Google Guice has some support for this already).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028384#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...