mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
15 lines
327 B
Java
15 lines
327 B
Java
// "Remove 'if' statement extracting side effects" "true-preview"
|
|
import org.jetbrains.annotations.NotNull;
|
|
class X {
|
|
public String getRole(Object parent) {
|
|
if (parent instanceof Foo) {
|
|
((Foo) parent).getBar();
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
|
|
interface Foo {
|
|
@NotNull
|
|
Integer getBar();
|
|
} |