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

Autoboxing expression decompiled incorrectly #60

Open
acyloxy opened this issue Jul 24, 2021 · 0 comments
Open

Autoboxing expression decompiled incorrectly #60

acyloxy opened this issue Jul 24, 2021 · 0 comments

Comments

@acyloxy
Copy link

acyloxy commented Jul 24, 2021

In most cases, autoboxing expressions can be decompiled correctly by jd-core.
But I've noticed that there is a flaw when decompiling the following code:
Double.valueOf(0.0).intValue();
It will be decompiled as 0.0.intValue();.
Obviously, it is incorrect, since basic types cannot be dereferenced.
Is there any way to fix it?
I think it could be transformed to a explicit cast (int) 0.0;.
Is it possible?

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