IDEA-91280 Infer not-nullity from numeric comparisons of values assigned based on that not-nullity

This commit is contained in:
peter
2012-09-10 15:57:27 +02:00
parent 448fe11025
commit b80416163d
3 changed files with 51 additions and 35 deletions
@@ -0,0 +1,8 @@
class Zoo2 {
void foo(java.util.List[] dealsInfo) {
final int dealsNumber = dealsInfo != null && dealsInfo.length == 2 ? dealsInfo[0].size() : 0;
if (dealsNumber > 0) {
System.out.println(dealsInfo[0].get(0));
}
}
}