From d890b369fdd9faffd20ecafa1c3dae29e01adef9 Mon Sep 17 00:00:00 2001 From: Illia Achour Date: Thu, 11 May 2023 18:44:59 +0200 Subject: [PATCH] Replace deprecated toUpperCase() kotlin.text calls (#779) * Replace deprecated toUpperCase() in README.md * Replace deprecated toUpperCase() in sample build.gradle.kts --- README.md | 2 +- examples/kotlin/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78f14ae1..006394d9 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ def isNonStable = { String version -> ```kotlin fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) } + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } val regex = "^[0-9,.v-]+(-r)?$".toRegex() val isStable = stableKeyword || regex.matches(version) return isStable.not() diff --git a/examples/kotlin/build.gradle.kts b/examples/kotlin/build.gradle.kts index 413f7f90..9349a514 100644 --- a/examples/kotlin/build.gradle.kts +++ b/examples/kotlin/build.gradle.kts @@ -30,7 +30,7 @@ configurations { } fun String.isNonStable(): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { toUpperCase().contains(it) } + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { uppercase().contains(it) } val regex = "^[0-9,.v-]+(-r)?$".toRegex() val isStable = stableKeyword || regex.matches(this) return isStable.not()