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,19 @@
class C {
Object foo(boolean b) {
if (b) {
<selection>return A.getInstance();</selection>
} else {
return B.getInstance();
}
}
}
class A {
static A getInstance() {
return new A();
}
}
class B extends A {
static B getInstance() {
return new B();
}
}