From d12e96c737e2a97bf5cfac5ac17659ce3e4d9eda Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 27 Mar 2024 17:02:48 +0100 Subject: [PATCH] docs(model): Explain why the `ConfigurationResolver` filters curations This relates to the check introduced in cf7c145. Signed-off-by: Sebastian Schuberth --- model/src/main/kotlin/utils/ConfigurationResolver.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/model/src/main/kotlin/utils/ConfigurationResolver.kt b/model/src/main/kotlin/utils/ConfigurationResolver.kt index 5009ff4fccb72..0df7a9b2d0969 100644 --- a/model/src/main/kotlin/utils/ConfigurationResolver.kt +++ b/model/src/main/kotlin/utils/ConfigurationResolver.kt @@ -65,6 +65,8 @@ object ConfigurationResolver { curationProvider.getCurationsFor(packages) } + // While every provider is supposed to only return applicable curations, filter to be on the safe side and + // only embed applicable curations in the ORT result. val (applicableCurations, nonApplicableCurations) = curations.partition { curation -> packages.any { pkg -> curation.isApplicable(pkg.id) } }