mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-20 20:20:56 +07:00
17 lines
380 B
Java
17 lines
380 B
Java
// "Remove 'if' statement extracting side effects" "true-preview"
|
|
import org.jetbrains.annotations.NotNull;
|
|
class X {
|
|
public String getRole(Object parent) {
|
|
if (parent instan<caret>ceof Foo && ((Foo)parent).getBar() == null) {
|
|
return "a";
|
|
}
|
|
else {
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
interface Foo {
|
|
@NotNull
|
|
Integer getBar();
|
|
} |