Skip to content

Commit 4333171

Browse files
authored
fix: Return unsorted vulnerabilities in new HashSet, avoiding CoMod (#7848)
2 parents de5c4d2 + 8c47e4d commit 4333171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public synchronized Set<Vulnerability> getVulnerabilities(boolean sorted) {
625625
if (sorted) {
626626
vulnerabilitySet = new TreeSet<>(vulnerabilities);
627627
} else {
628-
vulnerabilitySet = vulnerabilities;
628+
vulnerabilitySet = new HashSet<>(vulnerabilities);
629629
}
630630
return Collections.unmodifiableSet(vulnerabilitySet);
631631
}

0 commit comments

Comments
 (0)