Consider the following code:
public class Main {
public static class NormalClass {
public Class method() {
return Inte
In order to be compatible with Java 1.4 compiler assumes that if you drop the generic arguments on instance type declaration, then you work with the special version of the class where no generics exist at all. And it issues a warning if you mix a Java 1.4 non-generic code with Java 1.5+ generic code. That's easier than trying to figure out whether generic return type of your method is actually independent from parameters. You can always @SuppressWarning if you don't like it.