You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a regression between jadx-1.2.0-b1486-9744547f (ok, version used java-convert for decompilation) and jadx-1.3.0.213-6e8baef9 (failure with java-convert)
Tested with openjdk8.
Sample:
publicclassTest1 {
publicIntegercalcValue(finalIntegeri) {
if (i == null) {
returnnull;
}
Integerres = null;
try {
if (i == 5) {
res = 4;
} else {
res = 9;
}
}
catch (finalExceptionex) {
logError(ex);
}
returnres;
}
privatevoidlogError(Exceptionex) {
}
}
This is the decompilation result for jadx-1.3.0.213-6e8baef9 with --use-dx (Thank you for this flag!):
publicclassTest1 {
publicIntegercalcValue(Integeri) {
Integerres;
if (i == null) {
res = null;
returnnull;
}
res = null;
try {
if (i.intValue() == 5) {
return4;
}
return9;
} catch (Exceptionex) {
logError(ex);
returnres;
}
logError(ex); // <--- compilation error due to code duplicationreturnres;
}
privatevoidlogError(Exceptionex) {
}
}
Java-input works fine, so this is a dex only issue.
Suggested tags: try-catch, code-duplication, java-convert
Of course this sample can be used in unit tests.
The text was updated successfully, but these errors were encountered:
@nitram84 thanks!
Here jadx generate incorrect CFG for try/catch, so it is funny that jadx managed to generate something.
Also, with java-input I also got incorrect code: int res = null; this issue with type inference 🤦
And as a side note: I don't really need info about working version for regressions, I only check latest master branch, so you don't need to find working version :)
I found a regression between jadx-1.2.0-b1486-9744547f (ok, version used java-convert for decompilation) and jadx-1.3.0.213-6e8baef9 (failure with java-convert)
Tested with openjdk8.
Sample:
This is the decompilation result for jadx-1.3.0.213-6e8baef9 with --use-dx (Thank you for this flag!):
Java-input works fine, so this is a dex only issue.
Suggested tags: try-catch, code-duplication, java-convert
Of course this sample can be used in unit tests.
The text was updated successfully, but these errors were encountered: