Skip to content

Commit

Permalink
fix(model): Ensure getOpenIssues() returns no duplicates
Browse files Browse the repository at this point in the history
The same issue can occur for different identifiers, for example when a
scan of a specific provenance corresponds to multiple identifiers. So,
return only distinct issues.

Signed-off-by: Frank Viernau <[email protected]>
fviernau committed Apr 12, 2024
1 parent 2848c22 commit 993e98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/src/main/kotlin/OrtResult.kt
Original file line number Diff line number Diff line change
@@ -293,7 +293,7 @@ data class OrtResult(
*/
@JsonIgnore
fun getOpenIssues(minSeverity: Severity = Severity.WARNING) =
getIssues(omitExcluded = true, omitResolved = true, minSeverity = minSeverity).values.flatten()
getIssues(omitExcluded = true, omitResolved = true, minSeverity = minSeverity).values.flatten().distinct()

/**
* Return a list of [PackageConfiguration]s for the given [packageId] and [provenance].

0 comments on commit 993e98a

Please sign in to comment.