From b8a754f91b524b53a464167bf0abd6044caa25a4 Mon Sep 17 00:00:00 2001 From: cc-jhr <34243889+cc-jhr@users.noreply.github.com> Date: Thu, 19 Aug 2021 20:39:18 +0200 Subject: [PATCH] Fixed deprecation warnings --- .../de/codecentric/hikaku/extensions/FileExtensionsTest.kt | 3 ++- .../hikaku/converters/raml/extensions/MethodExtensions.kt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/test/kotlin/de/codecentric/hikaku/extensions/FileExtensionsTest.kt b/core/src/test/kotlin/de/codecentric/hikaku/extensions/FileExtensionsTest.kt index 3912c9fe..24998903 100644 --- a/core/src/test/kotlin/de/codecentric/hikaku/extensions/FileExtensionsTest.kt +++ b/core/src/test/kotlin/de/codecentric/hikaku/extensions/FileExtensionsTest.kt @@ -3,6 +3,7 @@ package de.codecentric.hikaku.extensions import org.junit.jupiter.api.Nested import org.junit.jupiter.api.Test import java.io.File +import kotlin.io.path.createTempDirectory import kotlin.test.assertFailsWith class FileExtensionsTest { @@ -20,7 +21,7 @@ class FileExtensionsTest { @Test fun `directory in validity check throws an exception`() { assertFailsWith { - createTempDir().checkFileValidity() + createTempDirectory().checkFileValidity() } } diff --git a/raml/src/main/kotlin/de/codecentric/hikaku/converters/raml/extensions/MethodExtensions.kt b/raml/src/main/kotlin/de/codecentric/hikaku/converters/raml/extensions/MethodExtensions.kt index fe4b965b..37d718b2 100644 --- a/raml/src/main/kotlin/de/codecentric/hikaku/converters/raml/extensions/MethodExtensions.kt +++ b/raml/src/main/kotlin/de/codecentric/hikaku/converters/raml/extensions/MethodExtensions.kt @@ -5,7 +5,7 @@ import de.codecentric.hikaku.endpoints.HttpMethod import de.codecentric.hikaku.endpoints.QueryParameter import org.raml.v2.api.model.v10.methods.Method -internal fun Method.hikakuHttpMethod() = HttpMethod.valueOf(this.method().toUpperCase()) +internal fun Method.hikakuHttpMethod() = HttpMethod.valueOf(this.method().uppercase()) internal fun Method.hikakuQueryParameters(): Set { return this.queryParameters()