dfa: turn on contract inference from source

This commit is contained in:
peter
2014-07-14 19:07:02 +02:00
parent b6b76b72d5
commit 3f7935aec2
8 changed files with 73 additions and 16 deletions
@@ -36,7 +36,7 @@ class BrokenAlignment {
}
public void bar(@NotNull Object foo) {
assert <warning descr="Condition 'foo != null' is always 'true'">foo != null</warning>;
if (<warning descr="Condition 'foo != null' is always 'true'">foo != null</warning>);
}
public void bar2(@NotNull Object foo) {
@@ -0,0 +1,15 @@
import org.jetbrains.annotations.Nullable;
class Doo {
boolean isNotNull(@Nullable Object o) {
return o != null;
}
void foo(@Nullable String s) {
if (isNotNull(s)) {
System.out.println(s.length());
}
}
}