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

fix(mapleir): fix org.mapleir.app.service.ClassTree#getAllBranches #57

Closed
wants to merge 1 commit into from

Conversation

InkerBot
Copy link

For example, we have three classes

public class Abst {
    public int apply(int a) {
        return a + 3;
    }
}
public interface Inte {
    int apply(int a);
}
public class Top extends Abst implements Inte {

    public void run() {
        if (((Inte) this).apply(3) == 6) {
            System.out.println("SUCCESS");
        } else {
            System.out.println("FAILURE");
        }
    }
}

If call this with Inte, it should return all these classes and java.lang.Object, but now it won't return Abst

In skidfuscator, ofuscate these code, will throw AbstractMethodError.

this pull request can fix it

For example, we have three classes: 'class Abst', 'interface Inte', 'class Top extends Abst implements Inte'
If call this with 'Inte', it should return all these classes and java.lang.Object
@terminalsin
Copy link
Member

For example, we have three classes

public class Abst {
    public int apply(int a) {
        return a + 3;
    }
}
public interface Inte {
    int apply(int a);
}
public class Top extends Abst implements Inte {

    public void run() {
        if (((Inte) this).apply(3) == 6) {
            System.out.println("SUCCESS");
        } else {
            System.out.println("FAILURE");
        }
    }
}

If call this with Inte, it should return all these classes and java.lang.Object, but now it won't return Abst

In skidfuscator, ofuscate these code, will throw AbstractMethodError.

this pull request can fix it

The behaviour is correct. Whilst Top branches to Abst and Inte, Inte and Abst have no correlated branches. Skidfuscator handles this behaviour correctly in the classtree by merging these methods implicitely. If the such is not working, please report it and I'll create a test!

Closed for the time being, lmk if any further design questions :)

image

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

Successfully merging this pull request may close these issues.

2 participants