You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a builder is generated for a class with a field marked as Nullable, the nullability is not transferred to the builder, causing warnings when trying to build an instance of that object using nullable variables.
To Reproduce
With lombok.addNullAnnotations = spring and a package-info.java with this:
Doing this would not interfere with the implementation of Builder.Default, since you generate a separate field for tracking if the field has already been manually set. With these changes I can do the following without any nullability warnings:
Describe the bug
When a builder is generated for a class with a field marked as Nullable, the nullability is not transferred to the builder, causing warnings when trying to build an instance of that object using nullable variables.
To Reproduce
With
lombok.addNullAnnotations = spring
and a package-info.java with this:Then when you make an object like this:
it becomes
Expected behavior
Nullable annotation is copied to the builder like so:
Doing this would not interfere with the implementation of Builder.Default, since you generate a separate field for tracking if the field has already been manually set. With these changes I can do the following without any nullability warnings:
Currently, I have to do this instead:
Version info (please complete the following information):
The text was updated successfully, but these errors were encountered: