Files
openide/java/java-tests/testData/refactoring/extractMethodNew/LocalVariablesAreNotExposed_after.java
Alexandr Suhinin 2f9a173e88 test: add test data for newly supported cases
GitOrigin-RevId: 01bda01714863b5c174c85350542cb1c49440e42
2020-04-01 09:31:41 +00:00

26 lines
523 B
Java

import org.jetbrains.annotations.Nullable;
import java.util.List;
public class Test {
public Test(Object o1, Object o2) {
}
private Object test(List<String> list) {
Test x = newMethod(list);
if (x != null) return x;
return null;
}
@Nullable
private Test newMethod(List<String> list) {
for (String some : list) {
String x = "x";
String y = "y";
if (some.isEmpty()) return new Test(x, y);
}
return null;
}
}