9
In a bunch o' places in my code, I have something like this:
public Class mySpecialMethod() {
return MySpecialClass.class;
}
which causes the warning
Class is a raw type. References to generic type Class should be parameterized.
But, if I replace
Class
with
Class<? extends Object>
the warning goes away.
Is this simple practice ok, or could it cause trouble later?