Skip to content

Commit

Permalink
feat: return early on null or empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
pcvolkmer committed Aug 19, 2024
1 parent 7e61a96 commit 34a88ef
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,10 @@ public Procedure createRadiotherapyProcedure(
* @return A tuple with start date and end date of all given partial radiations
*/
public Tupel<Date, Date> getTimeSpanFromPartialRadiations(List<Bestrahlung> partialRadiations) {
if (null == partialRadiations || partialRadiations.isEmpty()) {
return new Tupel<>(null, null);
}

val minDates =
partialRadiations.stream()
.map(radio -> convertObdsDateToDateTimeType(radio.getST_Beginn_Datum()))
Expand Down

0 comments on commit 34a88ef

Please sign in to comment.