From 5dbe633e25ae49b24708cf78f7cef33d211b0f31 Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Wed, 17 Jul 2024 17:45:57 +0200 Subject: [PATCH] refactor(conan): Slightly simplify the code for obtaining the URL Signed-off-by: Frank Viernau --- plugins/package-managers/conan/src/main/kotlin/Conan.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/package-managers/conan/src/main/kotlin/Conan.kt b/plugins/package-managers/conan/src/main/kotlin/Conan.kt index 20f853a6a5db0..01c0ccbc57270 100644 --- a/plugins/package-managers/conan/src/main/kotlin/Conan.kt +++ b/plugins/package-managers/conan/src/main/kotlin/Conan.kt @@ -392,8 +392,8 @@ class Conan( val artifactEntry = conanData.getValue("sources") val url = artifactEntry["url"].let { urlNode -> - (urlNode.takeIf { it.isTextual } ?: urlNode.first()).textValueOrEmpty() - } + urlNode.takeIf { it.isTextual } ?: urlNode.first() + }.textValueOrEmpty() val hashValue = artifactEntry["sha256"].textValueOrEmpty() val hash = Hash.create(hashValue, HashAlgorithm.SHA256.name)