diff --git a/cloud-kotlin/cloud-kotlin-extensions/src/main/kotlin/org/incendo/cloud/kotlin/extension/CloudKeyExtensions.kt b/cloud-kotlin/cloud-kotlin-extensions/src/main/kotlin/org/incendo/cloud/kotlin/extension/CloudKeyExtensions.kt index ef0f5a882..a3a60d91f 100644 --- a/cloud-kotlin/cloud-kotlin-extensions/src/main/kotlin/org/incendo/cloud/kotlin/extension/CloudKeyExtensions.kt +++ b/cloud-kotlin/cloud-kotlin-extensions/src/main/kotlin/org/incendo/cloud/kotlin/extension/CloudKeyExtensions.kt @@ -35,7 +35,7 @@ import org.incendo.cloud.key.CloudKeyHolder * @return the value, or `null` */ public fun CloudKeyContainer.getOrNull(key: CloudKey): T? = - this.optional(key).orElseGet(null) + this.optional(key).orElse(null) /** * Returns the value associated with the given [key], if it exists. @@ -45,7 +45,7 @@ public fun CloudKeyContainer.getOrNull(key: CloudKey): T? = * @return the value, or `null` */ public fun CloudKeyContainer.getOrNull(key: String): T? = - this.optional(key).orElseGet(null) + this.optional(key).orElse(null) /** * Returns the value associated with the given [keyHolder], if it exists. @@ -55,7 +55,7 @@ public fun CloudKeyContainer.getOrNull(key: String): T? = * @return the value, or `null` */ public fun CloudKeyContainer.getOrNull(keyHolder: CloudKeyHolder): T? = - this.optional(keyHolder).orElseGet(null) + this.optional(keyHolder).orElse(null) /** * Creates a new key with the given [name].