From 365f499de6329e721447a2cc61834ae281206615 Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Fri, 24 May 2024 11:56:25 +0200 Subject: [PATCH] chore(model): Drop some unnecessary sorting The callers do not make any assumption about the ordering, so the sorting is not needed. Signed-off-by: Frank Viernau --- model/src/main/kotlin/AdvisorRecord.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/main/kotlin/AdvisorRecord.kt b/model/src/main/kotlin/AdvisorRecord.kt index f0c616685c7c6..6adbe522fa899 100644 --- a/model/src/main/kotlin/AdvisorRecord.kt +++ b/model/src/main/kotlin/AdvisorRecord.kt @@ -127,7 +127,7 @@ data class AdvisorRecord( * references. Other [Vulnerability] properties are taken from the first object which has any such property set. */ private fun Collection.mergeVulnerabilities(): List { - val vulnerabilitiesById = groupByTo(sortedMapOf()) { it.id } + val vulnerabilitiesById = groupBy { it.id } return vulnerabilitiesById.map { it.value.mergeReferences() } }