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

Intellij, Jackson oddities with variables starting with 'x' #1278

Closed
parry84 opened this issue Jan 17, 2017 · 4 comments
Closed

Intellij, Jackson oddities with variables starting with 'x' #1278

parry84 opened this issue Jan 17, 2017 · 4 comments

Comments

@parry84
Copy link

parry84 commented Jan 17, 2017

I'm using Lombok 1.16.12 and IntelliJ Lombok plugin 0.14.16

Suppose I have a variable starting with 'x' as follow:

@Getter
@Setter
class MyModel {
    @JsonIgnore
    private String xMyField;
}

Suppose I have method using the generated getter as follow:

void myMethod(MyModel model) {
    println(model.getXMyField());
}

The code compiles and executes as expected but I face the following issues:

  • With IntelliJ 2017.3, if I select 'xMyField' and click 'Find Usages' the IDE reports no usages, which is incorrect
  • When serializing the model with Jackson, the 'xMyField' is included in the output despite the @JsonIgnore annotation.

If I remove the 'x' prefix (the variable is renamed 'myField') all the issues above disappears.

Regards,
Emanuele

@m-manu
Copy link

m-manu commented Jan 17, 2017

@parry84

With IntelliJ 2017.3, if I select 'xMyField' and click 'Find Usages' the IDE reports no usages, which is incorrect

I think you meant 2016.3

@parry84
Copy link
Author

parry84 commented Jan 23, 2017

Yes it's 2016.3, thanks

@rzwitserloot
Copy link
Collaborator

Perhaps this issue is better posted here: https://github.com/mplushnikov/lombok-intellij-plugin/issues

@rzwitserloot
Copy link
Collaborator

Duplicate of #2693

@rzwitserloot rzwitserloot marked this as a duplicate of #2693 Jan 2, 2021
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

3 participants