-
-
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
@Builder should respect @Nullable annotation #1570
Comments
Fixed in latest edge, thanks to @wmdietl :) |
There still is the problem that the annotations are not copied to the fields in the builder. This triggers the eclipse null analysis :-( |
This unfortunately still is not fixed and basically makes builder unusable along Kotlin, which introduces strict nullability detection. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just like @Setter, @builder should copy @nullable annotation to the method that sets the value for the field.
For example, having this class:
Lombok generates:
The method "public LombokNullableBuilder stringValue(String stringValue) {" should copy @nullable annotation to the parameter:
public LombokNullableBuilder stringValue(@Nullable String stringValue) {
Without this, IntelliJ's null inspection will flag this as a warning:
LombokNullable.builder().stringValue(methodAnnotatedWithNullable()
The text was updated successfully, but these errors were encountered: