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

Decompiler #356

Open
zxzzhange opened this issue Apr 26, 2024 · 1 comment
Open

Decompiler #356

zxzzhange opened this issue Apr 26, 2024 · 1 comment
Labels

Comments

@zxzzhange
Copy link

CFR version

CFR 0.151

Compiler

source :

public class Test {

public enum TestEnums {
    A,
    B,
    C
}

public void test(TestEnums testEnum) {
    switch (testEnum) {
        case A:
            System.out.println("is A");
            break;
        case B:
            System.out.println("is B");
            break;
        case C:
            System.out.println("is D");
            break;
        default:
            System.out.println("is default");
            break;
    }
}

}

decompiler result:

public class Test {
public void test(TestEnums testEnums) {
switch (1.$SwitchMap$com$seeyon$analysis$driver$Test$TestEnums[testEnums.ordinal()]) {
case 1: {
System.out.println("is A");
break;
}
case 2: {
System.out.println("is B");
break;
}
case 3: {
System.out.println("is D");
break;
}
default: {
System.out.println("is default");
}
}
}
}

Description

$SwitchMap This compilation is not accurate

Example

@zxzzhange zxzzhange added the bug label Apr 26, 2024
@leibnitz27
Copy link
Owner

leibnitz27 commented Apr 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants