mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-07 11:06:58 +07:00
Pure call result might depend on non-qualified variable as well (e.g., a static field) Fixes IDEA-286208 wrong judgement of code GitOrigin-RevId: 91ce214a1bc75bad64b344f332e85574fba25ca6
27 lines
520 B
Java
27 lines
520 B
Java
// IDEA-286208
|
|
public class PureMethodReadsMutableArray {
|
|
static char[] dic = new char[128], cnt = new char[128];
|
|
public static void main(String[] args) {
|
|
if (check()) {
|
|
cnt[0]=1;
|
|
if (check()) {}
|
|
}
|
|
if (check()) {
|
|
cnt[args.length]=1;
|
|
if (check()) {}
|
|
}
|
|
if (check()) {
|
|
cnt[0]++;
|
|
if (check()) {}
|
|
}
|
|
}
|
|
|
|
public static boolean check() {
|
|
for (int i = 0; i < 128; i++) {
|
|
if (dic[i] > cnt[i]) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
} |