From 696dc50194126e9f58c6f941cd598b3771194763 Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Tue, 9 Apr 2024 13:08:10 +0200 Subject: [PATCH] refactor(model): Simplify filtering resolved issues Signed-off-by: Frank Viernau --- model/src/main/kotlin/OrtResult.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/model/src/main/kotlin/OrtResult.kt b/model/src/main/kotlin/OrtResult.kt index 2d6d2dfa24f8a..e6e60d5347c97 100644 --- a/model/src/main/kotlin/OrtResult.kt +++ b/model/src/main/kotlin/OrtResult.kt @@ -281,9 +281,7 @@ data class OrtResult( getIssues() .mapNotNull { (id, issues) -> issues.takeUnless { isExcluded(id) } } .flatten() - .filter { issue -> - issue.severity >= minSeverity && getResolutions().issues.none { it.matches(issue) } - } + .filter { it.severity >= minSeverity && !isResolved(it) } /** * Return a list of [PackageConfiguration]s for the given [packageId] and [provenance].