Inspection bug?

Is this a bug? The following code compiles, but IDEA complains "Incovertible types; cannot cast 'int' to 'java.lang.Integer'. This also applies to other primitive types. There are times (since 1.5) when this kind of casting is required. Build #4192 on Windows XP.

public final class X {
void method() {
void methodX(Integer i) {


void methodX(Object o) {


1 comment
Comment actions Permalink

This is indeed a bug that managed to sneak into 5.1.1 The fix will be available in 5.1.2


Please sign in to leave a comment.