Files
openide/java/java-tests/testData/refactoring/extractMethod/BuilderChainWithArrayAccessIf_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
323 B
Java

class Foo {
boolean bar(String[] a) {
for (int i = 0; i < a.length; i++) {
if (newMethod(a, i)) return true;
}
return false;
}
private boolean newMethod(String[] a, int i) {
if (a[i].length() > 3 && i % 3 == 0)
return true;
return false;
}
}