Skip to content

Commit

Permalink
Replace deprecated toUpperCase() kotlin.text calls (#779)
Browse files Browse the repository at this point in the history
* Replace deprecated toUpperCase() in README.md

* Replace deprecated toUpperCase() in sample build.gradle.kts
  • Loading branch information
smelfungus authored May 11, 2023
1 parent 852c610 commit d890b36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion examples/kotlin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d890b36

Please sign in to comment.