diff --git a/model/src/main/kotlin/OrtResult.kt b/model/src/main/kotlin/OrtResult.kt index e6e60d5347c97..ab4a3473ddae3 100644 --- a/model/src/main/kotlin/OrtResult.kt +++ b/model/src/main/kotlin/OrtResult.kt @@ -504,12 +504,8 @@ data class OrtResult( .filterKeys { !omitExcluded || !isExcluded(it) } return if (omitResolved) { - val resolutions = getResolutions().vulnerabilities - allVulnerabilities.mapValues { (_, vulnerabilities) -> - vulnerabilities.filter { vulnerability -> - resolutions.none { it.matches(vulnerability) } - } + vulnerabilities.filter { isResolved(it) } }.filterValues { it.isNotEmpty() } } else { allVulnerabilities