Skip to content

Inappropriate finally block is removed from try statement #47

Open
@anand-k-hub

Description

@anand-k-hub

When try to decompile the below code and it's been wrongly decompiled.

Input Java Class:
public class TestClass {
public int test(){
before();
try {
inTry();
if(condition()) {
return 0;
}
inTryA();
inTryB();
} finally {
inFinally();
}
after();
return 1;
}
private boolean condition() {return false;};
private void before() {};
private void inTry() {};
private void inTryA() {};
private void inTryB() {};
private void inFinally() {};
private void after() {};
}
Decompiled Code:
public class TestClass {
public int test() {
before();
try {
inTry();
if (condition())
return 0;
inTryA();
} finally {
inFinally();
}
inFinally();
after();
return 1;
}
private boolean condition() {return false;};
private void before() {};
private void inTry() {};
private void inTryA() {};
private void inTryB() {};
private void inFinally() {};
private void after() {};
}
JD-Core version: 1.1.3
Compiled Java Version: 1.8.0_252

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions