Files
openide/java/java-tests/testData/refactoring/extractMethod/FoldingWithFieldInvolved_after.java
Anna Kozlova f2d460469a extract method: disable array access folding by default for cases where access is performed under condition
pessimistic approach for now: even if the condition consists of array access only; do not depend on the order of found references

GitOrigin-RevId: 0d111aad6b69729404183520d1f4d01cba583a1c
2019-10-11 21:02:34 +00:00

15 lines
243 B
Java

class Main {
private String [] args;
void foo(Main m, int i) {
newMethod(m, i);
}
private void newMethod(Main m, int i) {
if (m.args[i] != null) {
System.out.println(m.args[i]);
}
}
}