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

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

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

Comments

Projects
None yet
1 participant
@slemesle

slemesle commented Nov 11, 2014

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

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Nov 11, 2014

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

slemesle commented Nov 11, 2014

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

@slemesle slemesle closed this Nov 13, 2014

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