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

Lombok generated getters for fields with a first letter lower-case are not picked up by OpenPojo #120

Open
woshilapin opened this issue Jul 9, 2018 · 2 comments

Comments

@woshilapin
Copy link

woshilapin commented Jul 9, 2018

Here is an example of a Pojo that would cause problem.

@Getter
class MyClass {
  private String aField;
}

From what I understand, Lombok will generate the method .getAField() but OpenPojo will look for a getter named .getaField() (notice the different case).

From what I can see in the code, it's made explicit (see AttributeHelper class) but I don't understand this choice (maybe there is some standard for POJOs that Lombok doesn't follow and I'm not aware of?). Is there any reason why we should keep this if clause? If yes, do you think it would be possible to make OpenPojo to check for the presence of either .getAField() or .getaField()?

Thank you for this nice library.

@woshilapin
Copy link
Author

Well, I just found out the following link that kind of explain my problem: the answer seems to be "there is some standard I was not aware of". Some framework like Jackson offer the possibility to bypass that in a way (see this link). Would it be desirable to implement such a possibility?

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

2 participants