record-builder icon indicating copy to clipboard operation
record-builder copied to clipboard

Missing nullability annotation when using the addConcreteSettersForOptional setting

Open zoehneto opened this issue 11 months ago • 0 comments

When using record-builder with nullaway, the record-builder approach of keeping field annotations works nicely for nullable fields. In our code base, we often use fields wrapped with Optional instead of nullable fields though, which of course don't have a @Nullable annotation. This causes issues when enabling the option addConcreteSettersForOptional for nullable convenience setters, as those don't have a @Nullable annotation either (which nullaway then complains about). It would be great if we could provide the nullability annotation to use for such cases via the config and then have it on the generated setters.

zoehneto avatar Mar 13 '25 09:03 zoehneto