Files
openide/java/java-tests/testData/refactoring/extractMethod/ExtractBareThenBranch_after.java

24 lines
439 B
Java

import org.jetbrains.annotations.Nullable;
class ElseIf {
String foo(boolean a, boolean b) {
if (a) {
String s = newMethod(b);
if (s != null) return s;
}
return null;
}
@Nullable
private String newMethod(boolean b) {
if (b) {
String s = bar();
if (s != null) return s;
}
return null;
}
String bar() { return "";}
}