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

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

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
Labels
Milestone

Comments

@slemesle
Copy link
Collaborator

@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 slemesle added this to the 0.10 milestone Nov 11, 2014
slemesle added a commit that referenced this issue Nov 11, 2014
slemesle added a commit that referenced this issue Nov 11, 2014
@slemesle
Copy link
Collaborator Author

@slemesle 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.