Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inappropriate finally block is removed from try statement #47

Open
anand-k-hub opened this issue Jul 1, 2020 · 0 comments
Open

Inappropriate finally block is removed from try statement #47

anand-k-hub opened this issue Jul 1, 2020 · 0 comments

Comments

@anand-k-hub
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant