-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
@Value and @FieldDefaults should skip static fields #1254
Comments
@Value
and @FieldDefaults
should skip static fields
Would it be possible to add optional support for static fields in @FieldDefaults? |
I'm just upgrading my Lombok JAR from 1.16.10 to 1.16.16 and this "correction" just killed all my projects. My very simple use case is to put Now, everything is broken in all my projects and it makes Lombock useless for that kind of configuration. |
Another simple use case : on my "POJO beans" (ex : But, in fact, I use it in a "lombok.config" file to have it by default on the entire project. So I have to search for all my static fields and manually make them private where needed... It looks like 2 little things (combined with my previous post), but in the big company I'm working for, because all the newly (last 2 years) created applications (at least a dozen) use a parent Maven dependency configuration including Lombok, that king of modification causes a not so little work to do when updating... |
@Value
and@FieldDefaults
add the private and final modifiers to the fields if possible. This behavior is influenced by@NonFinal
and@PackagePrivate
.For instance fields, this makes sense. But for package private static non-final fields, this is an unexpected side-effect of adding
@Value
The text was updated successfully, but these errors were encountered: