IDEA-130024 (False warning 'if statement with identical branches')

This commit is contained in:
Bas Leijdekkers
2016-06-15 19:00:19 +03:00
parent 77edf02edc
commit 3894dc0f7a
6 changed files with 96 additions and 3 deletions
@@ -0,0 +1,23 @@
import org.jetbrains.annotations.NotNull;
class C {
Object foo(boolean b) {
if (b) {
return newMethod();
} else {
return newMethod();
}
}
@NotNull
private Object newMethod() {
return A.getInstance();
}
}
class A {
static A getInstance() {
return new A();
}
}
class B extends A {
}