From 6ebb731edf5ef7bcda10bbf36998590bbb12646c Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Fri, 29 Nov 2024 15:24:12 +0100 Subject: [PATCH] docs(advisor): Say that the original provider is kept in merged results Signed-off-by: Sebastian Schuberth --- advisor/src/main/kotlin/Advisor.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/advisor/src/main/kotlin/Advisor.kt b/advisor/src/main/kotlin/Advisor.kt index 2a0d5218bdecd..57f2bccd1df8a 100644 --- a/advisor/src/main/kotlin/Advisor.kt +++ b/advisor/src/main/kotlin/Advisor.kt @@ -98,6 +98,8 @@ class Advisor( providerResults } }.forEach { providerResults -> + // Merge results from different providers into a single map keyed by the package ID. The original + // provider is still maintained as part of the AdvisorResult's AdvisorDetails. providerResults.await().forEach { (pkg, advisorResults) -> results.merge(pkg.id, listOf(advisorResults)) { existingResults, additionalResults -> existingResults + additionalResults