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
This commit is contained in:
Anna Kozlova
2019-10-11 22:16:26 +02:00
committed by intellij-monorepo-bot
parent dbc31144f9
commit f2d460469a
5 changed files with 46 additions and 42 deletions

View File

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