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

Enums which implement methods can't be converted since v1.5.1 #374

Open
Chr3is opened this issue Jul 1, 2021 · 0 comments
Open

Enums which implement methods can't be converted since v1.5.1 #374

Chr3is opened this issue Jul 1, 2021 · 0 comments

Comments

@Chr3is
Copy link

Chr3is commented Jul 1, 2021

Hey,
enums which implement methods eg.

public enum MyEnum {

    SOME_VALUE {
        @Override
        void foo() {}
    };

    abstract void foo();
}

cannot be converted since v1.5.1. It seems that this change introduced this bug. I've attached a little demo project to demonstrate this. In 1.5.0 this type of enum was not acceptable which resulted in the supertype lookup to resolve to the correct class (DefaultSuperTypeResolverStrategy).

I think we have to check in the Types#isEnum() methode the supertype as well. I've tried to do with an extended EnumCustomConverter but there are other places which cannot be fixed with this CustomConverter eg. if the destination type is of type MyEnum.SOME_VALUE.class.

Demo project: OrikaBug.zip

Greetings,
Chris

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

No branches or pull requests

1 participant