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

26 lines
457 B
Java

import org.jetbrains.annotations.Nullable;
class ElseIf {
String foo(boolean a, boolean b) {
if (a) {
} else {
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 "";}
}