Inspection: autoboxed Integer never null
Hello,
someone walked in a really bad trap at work with semantic consequences. Shouldn't this show a warning that the expression is always / never true?
abstract int getIt();
void test() {
final Integer i = getIt();
if (i != null) { //missing warning: always true
System.out.println("not null");
} else {
System.out.println("null"); //missing warning: never true
}
}
Kai
请先登录再写评论。