dfa: check that states to be merged are really complementary (IDEA-136917)
[idea/community.git] / java / java-tests / testData / inspection / dataFlow / fixture / CheckComplementarityWhenMerge.java
1 import org.jetbrains.annotations.*;
2
3 import java.util.Collection;
4
5 class NullableTest {
6
7   public void foo(@Nullable String a, Collection<D> test) {
8     boolean filterA = a == null;
9     for (D i : test) {
10       if ("c".equals(i.getE()) || filterA || bar(a)) {
11         System.out.println("ok");
12       }
13     }
14   }
15
16   private native boolean bar(@NotNull String c);
17
18   private interface D {
19     String getE();
20   }
21
22 }