mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
dfa: turn on contract inference from source
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user