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() {
methodX((Integer)7);
}
void methodX(Integer i) {
}
void methodX(Object o) {
}
}
Please sign in to leave a comment.
This is indeed a bug that managed to sneak into 5.1.1 The fix will be available in 5.1.2