File tree Expand file tree Collapse file tree
src/main/java/org/dependencytrack/persistence Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1037,11 +1037,12 @@ public void deleteProjectsByUUIDs(Collection<UUID> uuids) {
10371037
10381038 // Collect parent collection projects that need metrics updates after deletion.
10391039 // Exclude parents that are themselves being deleted.
1040+ final Set <UUID > deleteUuids = uuids instanceof Set ? (Set <UUID >) uuids : Set .copyOf (uuids );
10401041 final Set <UUID > collectionParentUuids = projects .stream ()
10411042 .map (Project ::getParent )
10421043 .filter (parent -> parent != null
10431044 && parent .getCollectionLogic () != ProjectCollectionLogic .NONE
1044- && uuids . stream (). noneMatch ( u -> u . equals ( parent .getUuid () )))
1045+ && ! deleteUuids . contains ( parent .getUuid ()))
10451046 .map (Project ::getUuid )
10461047 .collect (Collectors .toSet ());
10471048
You can’t perform that action at this time.
0 commit comments