Files
openide/java/java-tests/testData/refactoring/extractMethod/BuilderChainWith2DimArrayAccess_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

17 lines
399 B
Java

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