mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
IDEA-106884 Detect that string concatenation produces not-null result
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class X {
|
||||
@NotNull
|
||||
String foo() {return "";}
|
||||
|
||||
void bar() {
|
||||
String o = foo();
|
||||
o += "";
|
||||
if (<warning descr="Condition 'o != null' is always 'true'">o != null</warning>) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user