From c9fdf417c8e15c3fd2e0c6d4d48ee4f7ad6f0d77 Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Mon, 18 Dec 2023 23:01:06 +0100 Subject: [PATCH] refactor(model): Make `resolveResolutions()` an extension function Signed-off-by: Frank Viernau --- model/src/main/kotlin/utils/ConfigurationResolver.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/model/src/main/kotlin/utils/ConfigurationResolver.kt b/model/src/main/kotlin/utils/ConfigurationResolver.kt index 5a1d74858e135..f82d44a70b8a2 100644 --- a/model/src/main/kotlin/utils/ConfigurationResolver.kt +++ b/model/src/main/kotlin/utils/ConfigurationResolver.kt @@ -94,11 +94,9 @@ object ConfigurationResolver { ruleViolations: List, vulnerabilities: List, resolutionProvider: ResolutionProvider - ): Resolutions { - val issueResolutions = issues.flatMap { resolutionProvider.getResolutionsFor(it) }.distinct() - val ruleViolationResolutions = ruleViolations.flatMap { resolutionProvider.getResolutionsFor(it) }.distinct() - val vulnerabilityResolutions = vulnerabilities.flatMap { resolutionProvider.getResolutionsFor(it) }.distinct() - - return Resolutions(issueResolutions, ruleViolationResolutions, vulnerabilityResolutions) - } + ) = Resolutions( + issues = issues.flatMap { resolutionProvider.getResolutionsFor(it) }.distinct(), + ruleViolations = ruleViolations.flatMap { resolutionProvider.getResolutionsFor(it) }.distinct(), + vulnerabilities = vulnerabilities.flatMap { resolutionProvider.getResolutionsFor(it) }.distinct() + ) }