When operator-assigning to an array field, the field is read twice in the decompiled output. This could cause race conditions in multithreaded contexts.
This doesn't happen with function calls, though the output is quite awkward.
This is a regression since version 0.146, where the result with fields was similar to that with functions.
Example
class Test3 {
int[] a;
int[] a() { return null; }
}
class Test3s {
void test3a(Test3 a) {
a.a[0] |= 0xFF;
}
void test3b(Test3 a) {
a.a[0] = a.a[0] | 0xFF;
}
void test3c(Test3 a) {
a.a()[0] |= 0xFF;
}
void test3d(Test3 a) {
// This one is decompiled 100% correctly
a.a()[0] = a.a()[0] | 0xFF;
}
}
CFR version 0.151, javac version 1.8.0_282
When operator-assigning to an array field, the field is read twice in the decompiled output. This could cause race conditions in multithreaded contexts.
This doesn't happen with function calls, though the output is quite awkward.
This is a regression since version 0.146, where the result with fields was similar to that with functions.
Example
Decompiles into