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] Use of 0 instead of null (type inference failed) #920

Closed
bagipro opened this issue Apr 29, 2020 · 3 comments
Closed

[core] Use of 0 instead of null (type inference failed) #920

bagipro opened this issue Apr 29, 2020 · 3 comments
Assignees
Labels
bug Core Issues in jadx-core module hard-to-fix try-catch
Milestone

Comments

@bagipro
Copy link
Collaborator

bagipro commented Apr 29, 2020

Hi, class com.apptentive.android.sdk.comm.ApptentiveClient

    public static java.lang.String getErrorResponse(java.net.HttpURLConnection httpURLConnection, boolean z) throws java.io.IOException {
        java.io.InputStream inputStream = 0; // <<<<<
        if (httpURLConnection == null) {
            return inputStream; // <<<<<
        }
        try {
            java.io.InputStream errorStream = httpURLConnection.getErrorStream();
            if (errorStream != null && z) {
                errorStream = new java.util.zip.GZIPInputStream(errorStream);
            }
            return com.apptentive.android.sdk.util.Util.readStringFromInputStream(inputStream, "UTF-8");
        } finally {
            com.apptentive.android.sdk.util.Util.ensureClosed(inputStream);
        }
    }

APK: https://drive.google.com/file/d/1ICfL4A22K-KhVkw5RwvWdLJA8111iYvG/view?usp=sharing

@skylot
Copy link
Owner

skylot commented Oct 29, 2020

Short problem description:
Now for some try/catch cases constructed incorrect CFG so variables from catch or finally have incorrect scope.
As soon as to fix that CFG need heavy transformation this break lots of other try/catch cases.

@skylot
Copy link
Owner

skylot commented Aug 22, 2021

Fixed in 7c0671c. Although be careful, these changes are big, and definitely break something 🙄

@skylot skylot closed this as completed Aug 22, 2021
@bagipro
Copy link
Collaborator Author

bagipro commented Aug 22, 2021

Thanks, @skylot!

I see that they're only a few issues left!

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 hard-to-fix try-catch
Projects
None yet
Development

No branches or pull requests

2 participants