From 746787b6c660d65f6035aad05f89736b935d227d Mon Sep 17 00:00:00 2001 From: Frank Viernau Date: Thu, 18 Jul 2024 15:16:56 +0200 Subject: [PATCH] refactor(bower): Simplify a non-null check Signed-off-by: Frank Viernau --- plugins/package-managers/bower/src/main/kotlin/Bower.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/package-managers/bower/src/main/kotlin/Bower.kt b/plugins/package-managers/bower/src/main/kotlin/Bower.kt index dfaf57e100c27..4200e3331f602 100644 --- a/plugins/package-managers/bower/src/main/kotlin/Bower.kt +++ b/plugins/package-managers/bower/src/main/kotlin/Bower.kt @@ -227,7 +227,8 @@ private fun parseDependencyTree( // about the subtree rooted at the parent from that other node containing the full dependency // information. // See https://github.com/bower/bower/blob/6bc778d/lib/core/Manager.js#L557 and below. - val alternativeNode = checkNotNull(alternativeNodes[info.key]) + @Suppress("UnsafeCallOnNullableType") + val alternativeNode = alternativeNodes.getValue(info.key!!) return parseDependencyTree(alternativeNode, scopeName, alternativeNodes) }