Description
We should change the definition of PersistentPropertyPath
to — in its public API — not allow empty instances anymore. Those violate the concept and bleed into the concept's API by having to make all methods nullable (returning null in exactly that "empty" case). An empty property path doesn't make any actual sense as you cannot reasonably answer the methods declared on the interface except by returning null, which then causes client code having to verify the returned values all the time.
This is now changed into only making PersistentPropertyPath.getParentPath()
nullable and letting it return null for single segment paths. Adapted client code accordingly. ….getRequiredLeadProperty()
is now deprecated in favour of ….getLeafProperty()
not returning null anymore.