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

[core][java-input][dx] Warning: Finally extract failed #1501

Closed
nitram84 opened this issue May 29, 2022 · 1 comment
Closed

[core][java-input][dx] Warning: Finally extract failed #1501

nitram84 opened this issue May 29, 2022 · 1 comment
Labels
bug Core Issues in jadx-core module try-catch

Comments

@nitram84
Copy link
Contributor

This finally-example is different to all other finally issues I reported before. When I try to decompile this sample (compiled with openjdk8) with jadx-1.4.0.8-c906c11b a warning "Finally extract failed" is reported.
Finally extraction fails with java-input or java-convert+dx. Java-convert+d8 works fine without a warning.

This might be a missing corner case for your mark finally algorithm.

public class WarningFinallyExtractFailed {

  private TestClass t;

  public void doSomething() {
    try {
      if(t != null) {
        t.doSomething();
      }
    } finally {
      if(t != null) {
        t.doFinally();
      }
    }
  }

  private class TestClass {

    public void doSomething() {
    }

    public void doFinally() {
    }
  }
}
@nitram84 nitram84 added bug Core Issues in jadx-core module labels May 29, 2022
@skylot
Copy link
Owner

skylot commented May 31, 2022

@nitram84 thanks for a nice test case! I commit a fix to improve blocks tree compare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module try-catch
Projects
None yet
Development

No branches or pull requests

2 participants