Skip to content

Commit b8bddd3

Browse files
staktracesvc-squareup-copybara
authored andcommitted
Fix compilation errors for kotlin 2.1
GitOrigin-RevId: 2f35eace38f6455a3156d38405e3b8d80b87d43b
1 parent b63b143 commit b8bddd3

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

misk-admin/src/main/kotlin/misk/web/metadata/ServiceMetadataAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ServiceMetadataAction @Inject constructor(
2727
// Misk-web expects an UPPERCASE environment. Since this action could get a serviceMetadata
2828
// object from anywhere, it must be transformed here.
2929
val metadata = with(optionalBinder.serviceMetadata) {
30-
copy(environment = this.environment.toUpperCase())
30+
copy(environment = this.environment.uppercase())
3131
}
3232
return Response(serviceMetadata = metadata)
3333
}

misk-config/src/main/kotlin/misk/config/MiskConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ object MiskConfig {
348348
private fun embeddedConfigFileNames(appName: String, deployment: Deployment) =
349349
listOf(
350350
"common",
351-
deployment.mapToEnvironmentName().toLowerCase(Locale.US)
351+
deployment.mapToEnvironmentName().lowercase(Locale.US)
352352
).map { "$appName-$it.yaml" }
353353

354354
class SecretJacksonModule(val resourceLoader: ResourceLoader, val mapper: ObjectMapper) :

misk-core/src/main/kotlin/misk/web/mediatype/MediaRange.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ data class MediaRange @JvmOverloads constructor(
129129
"$s is not a valid media range; encountered charset parameter in extensions"
130130
}
131131

132-
charset = Charset.forName(p.second.toUpperCase())
132+
charset = Charset.forName(p.second.uppercase())
133133
}
134134
inParameters -> parameters[p.first] = p.second
135135
else -> extensions[p.first] = p.second

misk-jdbc/src/main/kotlin/misk/vitess/Destination.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data class Destination(
5050
val tabletType = if (index == -1) {
5151
null
5252
} else {
53-
var name = string.substring(index + 1).toUpperCase()
53+
var name = string.substring(index + 1).uppercase()
5454
if (name == "PRIMARY") {
5555
name = "MASTER"
5656
}

misk-jdbc/src/testFixtures/kotlin/misk/jdbc/JdbcTestFixture.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class JdbcTestFixture(
5959
val truncatedTableNames = mutableListOf<String>()
6060
connection.createStatement().use { statement ->
6161
for (tableName in allTableNames) {
62-
if (persistentTables.contains(tableName.toLowerCase(Locale.ROOT))) continue
62+
if (persistentTables.contains(tableName.lowercase(Locale.ROOT))) continue
6363
if (tableName.endsWith("_seq") || tableName.equals("dual")) continue
6464

6565
if (config.type == DataSourceType.COCKROACHDB || config.type == DataSourceType.POSTGRESQL) {

samples/exemplar/src/main/kotlin/com/squareup/exemplar/actions/HelloWebPostAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class HelloWebPostAction @Inject constructor() : WebAction {
1818
@RequestContentType(MediaTypes.APPLICATION_JSON)
1919
@ResponseContentType(MediaTypes.APPLICATION_JSON)
2020
fun hello(@PathParam name: String, @RequestBody body: PostBody): HelloPostResponse {
21-
return HelloPostResponse(body.greeting, name.toUpperCase())
21+
return HelloPostResponse(body.greeting, name.uppercase())
2222
}
2323
}
2424

samples/exemplar/src/main/kotlin/com/squareup/exemplar/actions/HelloWebProtoAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class HelloWebProtoAction @Inject constructor() : WebAction {
3030
return Response(
3131
HelloWebResponse().newBuilder()
3232
.greeting(greeting(request))
33-
.name(request.nick_name?.toUpperCase() ?: request.name.toUpperCase())
33+
.name(request.nick_name?.uppercase() ?: request.name.uppercase())
3434
.build()
3535
)
3636
}

0 commit comments

Comments
 (0)