Randgalt / record-builder

Record builder generator for Java records

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Staged builders are not generated for records having only a single field

gabrielshanahan opened this issue · comments

This is problematic because the main reason you want to use staged builders is so you get a compile-time error if you add a (non-nullable) field to the record, but forget to specify it in the builder. This can happen as easily when you add a second field as it can when you add a third, fourth, or first one for that matter. Staged builders should be generated in all cases.