Skip to content

Add compilation error when default enum value does not exist #40

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

Closed
slemesle opened this issue Nov 11, 2014 · 1 comment
Closed

Add compilation error when default enum value does not exist #40

slemesle opened this issue Nov 11, 2014 · 1 comment
Milestone

Comments

@slemesle
Copy link

When Selma generates the custom enum mapping, it does not checks for validity of the default value if defined.
So we get a compilation warning on the generated class.

We should add a compiler check for that to report a comprehensive error.

@slemesle
Copy link
Author

Selma will now raise a compilation error like that:

Invalid default value for @EnumMapper(from=fr.xebia.extras.selma.beans.EnumA.class, to=fr.xebia.extras.selma.beans.EnumB.class, default="c") fr.xebia.extras.selma.beans.EnumB.c does not exist

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

No branches or pull requests

1 participant