Here is another case that CFR may generate invalid Java code. In this example, CFR may mix value '0' and 'false', would you like to have a look? The total case is available at error example and I hope it can be helpful.
Example
The source code:
int i20 = 35;
boolean bArr1[]= new boolean[N];
switch(30){
case 32 : {
boolean b2 = false;
bArr1[i20]= b2;
}
short s1 = 31371;
}
The code decompiled by CFR:
int n = 35;
boolean[] blArray = new boolean[this.N];
switch (30) {
case 32: {
int n2;
blArray[n] = n2 = 0;
n2 = 31371;
}
}
CFR version
CFR version: 0.152
Compiler
Java openJDK, version: 11.0.13
Description
Here is another case that CFR may generate invalid Java code. In this example, CFR may mix value '0' and 'false', would you like to have a look? The total case is available at error example and I hope it can be helpful.
Example
The source code:
The code decompiled by CFR: