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

Enum is being mapped with private member variable that cannot be ignored #118

Closed
mattdandrea opened this issue Sep 20, 2016 · 3 comments
Closed
Labels
Milestone

Comments

@mattdandrea
Copy link

mattdandrea commented Sep 20, 2016

I cannot seem to ignore the private "description" field from showing up in the generated Selma mapping class.
And, it is trying to access it like it's public for some reason:

   switch (in) {
        case ONE :  {
        ...
          break;
        }
        case TWO :  {
        ...
          break;
        }
        case THREE :  {
        ...
          break;
        }
        case description :  {
        ...
          break;
        }
      }

Any ideas?

Here is the enum (it matches for both the source and destination):

public enum NumberEnum {
    ONE("one"),
    TWO("two"),
    THREE("three");

    private String description;

    private NumberEnum(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }
}
@slemesle
Copy link
Collaborator

Hi it looks like a bug, Selma should definitely ignore this kind of members.
I'll have a deeper look on this quickly.
Thanks for the report.

@slemesle slemesle added the bug label Sep 20, 2016
@slemesle slemesle added this to the 1.0 Final milestone Sep 20, 2016
@mattdandrea
Copy link
Author

Thanks for fixing this! Will this only be available in the 1.0 release or before as well?

@slemesle slemesle closed this as completed Oct 5, 2016
@slemesle
Copy link
Collaborator

slemesle commented Oct 5, 2016

Winter and 1.0 is coming :)

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

No branches or pull requests

2 participants