From 5ebfb63710d8537798f7bc395f196c6422e1eb0c Mon Sep 17 00:00:00 2001 From: Jens Keim Date: Wed, 26 Jun 2024 15:32:29 +0200 Subject: [PATCH] refactor(OrtResultExtension): Use `KnownProvenance.matches(KnownProvenance)` Signed-off-by: Jens Keim --- model/src/main/kotlin/utils/OrtResultExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/src/main/kotlin/utils/OrtResultExtensions.kt b/model/src/main/kotlin/utils/OrtResultExtensions.kt index 68f24dc67adc9..87dc8c6d0c2ad 100644 --- a/model/src/main/kotlin/utils/OrtResultExtensions.kt +++ b/model/src/main/kotlin/utils/OrtResultExtensions.kt @@ -86,7 +86,7 @@ fun OrtResult.createLicenseInfoResolver( */ fun OrtResult.getRepositoryPath(provenance: RepositoryProvenance): String { repository.nestedRepositories.forEach { (path, nestedProvenance) -> - if (nestedProvenance is RepositoryProvenance && nestedProvenance == provenance) { + if (nestedProvenance.matches(provenance)) { return "/$path/" } }