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

[BUG] @FieldNameConstants causes Eclipse error messages on save #2024

Closed
focdanisch opened this issue Jan 17, 2019 · 3 comments
Closed

[BUG] @FieldNameConstants causes Eclipse error messages on save #2024

focdanisch opened this issue Jan 17, 2019 · 3 comments

Comments

@focdanisch
Copy link

focdanisch commented Jan 17, 2019

Describe the bug
Using lombok 1.18.4 and Eclipse (tested with 4.7.3a and 2018-12), enabling one of the save actions "Organize imports" or "Additional actions" on a class annotated with @FieldNameConstants causes Eclipse to print out error messages when saving the file:

image

The file is saved, but no further actions are applied (e.g., removing orphaned imports).

To Reproduce
I created a small maven eclipse project which showcases the problem. You can find the code here.

The only thing I have changed in the project properties is enabling "Save Actions" under "Java Editor". "Format source code" works without problems, but enabling "Organize imports" or "Additional actions" triggers the error message above.

Expected behavior
Eclipse should do its reorganization tasks without error and save the file which is annotated with @FieldNameConstants.

Version info (please complete the following information):

  • Lombok version 1.18.4 and 1.18.5 (lombok-edge from website snapshot download)
  • Java jdk1.8.0_191
  • Eclipse 4.7.3a and 2018-12

Additional context
The problem does not occur when using lombok 1.18.2. But the field names are of course in the old format (FIELD_XYZ instead of Fields.xyz => see test main method), as the implementation changed in 1.18.4.

@focdanisch
Copy link
Author

lombokSaveErrorStacktrace.txt

Stacktrace after file save.

@rzwitserloot
Copy link
Collaborator

yup. Reproduced. Trying to see if I can fix this. We can't exactly write a unit test for this kind of thing (at least, we don't have the infrastructure to do it).

@rzwitserloot
Copy link
Collaborator

this is now available in edge release: https://projectlombok.org/download-edge

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