Java Decompiler IntelliJ Plugin Bug?
Hello. I tried to decompile some .class files and find bug with java decompiler working.
First of all, Java decompiler may inverts boolean expressions inside if expression. for example, this code
if (i == 0 || j > 0 || j > 10) {
System.out.println("LA");
}
is equal with decompilation. But, when I add else statement, such as:
if (i == 0 || j > 0 || j > 10) {
System.out.println("LA");
}
else{
System.out.println("Lalala");
}
Decompiled code will be:
if(this.i != 0 && this.j <= 0 && this.j <= 10) {
System.out.println("Lalala");
} else {
System.out.println("LA");
}
This is true with sematics, but false with decompiler point of view.
So this inverting is born bug such as:
if (i == 0 || j > 0 || j > 10) {
}
Decompiled version will be:
if(this.i != 0 && this.j <= 0 && this.j > 10) {
;
}
But this is semantics false.
Where I can write about this bug to clean it?
Please sign in to leave a comment.
Hi, although I do not see a bug here, you can file it here: https://youtrack.jetbrains.com/newIssue?project=IDEA