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][dx] Object to Object[] cast can't be recompiled #1527

Closed
nitram84 opened this issue Jun 10, 2022 · 1 comment
Closed

[core][dx] Object to Object[] cast can't be recompiled #1527

nitram84 opened this issue Jun 10, 2022 · 1 comment
Labels
bug Core Issues in jadx-core module type-inference

Comments

@nitram84
Copy link
Contributor

With latest git version, "Use dx convert" and "dx" options this example can't be recompiled:

public class ArrayOfObjectCast {
  public Number getFirstAsNumber(Object objectArray) {
    Object[] arr = (Object[]) objectArray;
    return (Number) arr[0];
  }
}

Jadx decompiles this to:

public class ArrayOfObjectCast {
  public Number getFirstAsNumber(Object objectArray) {
    Object arr = (Object[]) objectArray;
    return (Number) arr[0];
  }
}

With d8 or java-input-plugin erverything is fine.

@nitram84 nitram84 added bug Core Issues in jadx-core module labels Jun 10, 2022
@skylot
Copy link
Owner

skylot commented Jun 12, 2022

Fixed. Caused by funny issue in Java compiler, fixed in Java 9, was open for 9 years 🤣

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 type-inference
Projects
None yet
Development

No branches or pull requests

2 participants