diff --git a/src/server/src/main/java/io/cassandrareaper/storage/repairrun/CassandraRepairRunDao.java b/src/server/src/main/java/io/cassandrareaper/storage/repairrun/CassandraRepairRunDao.java index 096874248..f1671d78d 100644 --- a/src/server/src/main/java/io/cassandrareaper/storage/repairrun/CassandraRepairRunDao.java +++ b/src/server/src/main/java/io/cassandrareaper/storage/repairrun/CassandraRepairRunDao.java @@ -30,6 +30,7 @@ import java.util.Collection; import java.util.Date; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.SortedSet; @@ -395,15 +396,14 @@ public List getRepairRunsForClusterPrioritiseRunning(String clusterNa ) ) ); + // Defuture the repair_run rows and build the strongly typed RepairRun objects from the contents. return repairRunFutures .stream() - .map( - row -> { - Row extractedRow = row.getUninterruptibly().one(); - return buildRepairRunFromRow(extractedRow, extractedRow.getUUID("id")); - } - ).collect(Collectors.toList()); + .map(row -> row.getUninterruptibly().one()) + .filter(Objects::nonNull) + .map(extractedRow -> buildRepairRunFromRow(extractedRow, extractedRow.getUUID("id"))) + .collect(Collectors.toList()); } @Override