IDEA-99725 "Constant conditions & exceptions" inspection produces invalid code

This commit is contained in:
peter
2013-02-03 22:42:55 +01:00
parent 7d5c3aeabc
commit 8a3b6547f6
3 changed files with 29 additions and 1 deletions
@@ -0,0 +1,10 @@
// "Replace with 'integer != null ?:'" "true"
import java.lang.Integer;
class A{
void test(){
Integer integer = null;
int i = integer != null ? integer.toString().length() : <selection>0</selection>;
}
}
@@ -0,0 +1,10 @@
// "Replace with 'integer != null ?:'" "true"
import java.lang.Integer;
class A{
void test(){
Integer integer = null;
int i = in<caret>teger.toString().length();
}
}