Skip to content

Commit

Permalink
chore(model): Drop some unnecessary sorting
Browse files Browse the repository at this point in the history
The callers do not make any assumption about the ordering, so the
sorting is not needed.

Signed-off-by: Frank Viernau <frank_viernau@epam.com>
  • Loading branch information
fviernau committed May 24, 2024
1 parent c7edb85 commit 69f8c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/src/main/kotlin/AdvisorRecord.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vulnerability>.mergeVulnerabilities(): List<Vulnerability> {
val vulnerabilitiesById = groupByTo(sortedMapOf()) { it.id }
val vulnerabilitiesById = groupBy { it.id }
return vulnerabilitiesById.map { it.value.mergeReferences() }
}

Expand Down

0 comments on commit 69f8c6e

Please sign in to comment.