Details
-
Task
-
Status: Resolved
-
Medium
-
Resolution: Won't Do
-
None
-
None
-
None
Description
Binding list/map treatment should make sure we do not return nulls here, as it imposes additional burden on the user. When a list/map does not exist, we should return an empty immutable list/map, so that things are kept consistent.
This automatically means DTOs do not leak mutable maps, no matter what. Even when a map is initialized (empty in this case, but we are generalizing here) to an HashMap in the builder, it is fair for the resulting object to return an immutable implementation (i.e. an empty ImmutableMap).