This PR solves two TODOs related to Cargo: one in which the logic for creating a new Cargo instance is moved into a cargo factory class, and one in which events used in the deriveDeliveryProgress method are filtered so that only events for the specified cargo are used. Additionally, it removes the DomainObjectUtils.nullSafe method and replaces it with ObjectUtils.defaultIfNull from Apache Commons Lang 3.
This PR solves two TODOs related to Cargo: one in which the logic for creating a new Cargo instance is moved into a cargo factory class, and one in which events used in the
deriveDeliveryProgress
method are filtered so that only events for the specified cargo are used. Additionally, it removes theDomainObjectUtils.nullSafe
method and replaces it withObjectUtils.defaultIfNull
from Apache Commons Lang 3.