diff --git a/src/main/java/org/broadinstitute/hellbender/utils/haplotype/EventMap.java b/src/main/java/org/broadinstitute/hellbender/utils/haplotype/EventMap.java index 82d27f539a8..7a399ac2633 100644 --- a/src/main/java/org/broadinstitute/hellbender/utils/haplotype/EventMap.java +++ b/src/main/java/org/broadinstitute/hellbender/utils/haplotype/EventMap.java @@ -286,7 +286,7 @@ public static TreeSet getEventStartPositions(final Collection getOverlappingEvents(final int loc) { - final List overlappingEvents = headMap(loc, true).values().stream().filter(v -> (v.getStart() >= loc || v.isTrimmedEvent()) && v.getEnd() >= loc).collect(Collectors.toList()); + final List overlappingEvents = headMap(loc, true).values().stream().filter(v -> (v.getStart() >= loc || v.isTrimmedEvent()) && v.getEnd() >= loc).toList(); // if we're at the start of an insertion, exclude deletions that end here; otherwise keep everything final Predicate filter = overlappingEvents.stream().anyMatch(Event::isSimpleInsertion) ? v -> !(v.isSimpleDeletion() && v.getEnd() == loc) : v -> true;