necessary to allow for "Optional<TripInfo>" in notifyChangedTripInformation?

Description

PreplanningEngine#notifyChangedTripInformation has as argument Optional<TripInfo>. I am wondering if the hedging against a possibly non-existent TripInfo is truly necessary here. I.e. is there a use case? If I see it correctly, the method can only be called for trips that were already accepted before. Surely, a drt vehicle can break down or other things can happen, but can't we treat them by moving the pickup time to later? As you know, for our uses cases (drt being part of public transit), rejection is not an option anyways, because there is a service requirement. Is it an option for commercial operators, i.e. is it an accepted strategy (worth of scientific investigation) to first accept pre-bookings and then cancel them later?

I just don't want to spend time and effort on corner cases that should not happen in a normally functioning system.

Also, my IDE says that Optional should not be used in method signatures.

Environment

None

Assignee

Michal Maciejewski

Reporter

Kai Nagel

Labels

None

Priority

Major
Configure