Before for String.class the "Class<String> type was returned (instead of simply "String" type). This was usually fine, but for int.class and Integer.class the same "Class<Integer>" type was returned, despite the constants are different.