Skip to content

[core] Failed to restore switch over string #2884

Description

@flleeppyy

Issue details

JADX throws decomp warning when decompiling com.bandcamp.android_3.3.5-220483

I have tried in other decompilers and they fail (Fernflower, unknown version)

   public final void m(GsonRequest<LoginResponse> param1) {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      //

Login.java

or give egregious output (CFR 0.153-SNAPSHOT (c414525))

    /*
     * Enabled aggressive block sorting
     * Enabled unnecessary exception pruning
     * Enabled aggressive exception aggregation
     * Converted monitor instructions to comments
     * Lifted jumps to return sites
     */

Login.java

The output it gives is "fine" but it creates 4 different locals that are attributed to the same thing (accessToken and refreshToken) and just makes it a bit of a headache to stare at

Relevant log output or stacktrace

/* JADX WARN: Code duplicated, block: B:100:0x0109 A[EXC_TOP_SPLITTER, SYNTHETIC] */
    /* JADX WARN: Code duplicated, block: B:84:0x0111  */
    /* JADX WARN: Code duplicated, block: B:96:0x0135 A[Catch: all -> 0x0131, TRY_ENTER, TryCatch #0 {all -> 0x0131, blocks: (B:82:0x0109, B:85:0x0113, B:87:0x0119, B:89:0x011d, B:91:0x0121, B:94:0x0133, B:96:0x0135, B:97:0x013a), top: B:100:0x0109 }] */
    /* JADX WARN: Failed to restore switch over string. Please report as a decompilation issue */
    /* JADX INFO: renamed from: m */

Provide sample and class/method full name

This is for class com.bandcamp.shared.network.Login.m or function in class that contains string twoFactorNoMatch and similar strings for login.

Jadx version

(Latest from master) r2662.8c28a85 w/ OpenJDK 21.0.6

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions