Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class is a raw type. References to generic type Class<T> should be parameterized

The interface declares the method with a raw type. In that case, you can't override it nicely without having the warning.

The origin of your problem is that the Spring interface was declared to be Java 1.4 compliant. Note that Spring 3.0 is supposed to deliver all classes as Java 1.5 compliant, so that would fix your problem. Before you upgrade, I guess you would have to live with either the warning or the @SuppressWarning.


Since the interface forces you to use the raw type (i.e. doesn't allow you to specify the correct type information) you can't implement it without warnings unless you use @SupressWarnings.

The only real fix is to fix the interface (i.e. make it define boolean supports(Class<?> aClass)).