Closed krzyk closed 3 years ago
Duplicate of #56
@Randgalt It doesn't look like a duplicate of #56.
My proposition is to handle null gracefully by using empty List/Set/Map, while #56 is all about umodifiable collections.
OK - I guess I misunderstood. You're staying if someone passes in a null to the builder then, e.g., List.of()
is used instead of null? I'm not sure how I feel about that. I think that would be unexpected.
@Randgalt thank you
I think many people would like to have
emptyDefaultForCollections
, where instead of nulls builder would set following instances in the record built: