Skip to content

Commit db77192

Browse files
committed
Remove deprecated usage of String.toLowerCase()
1 parent 9da37cf commit db77192

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/kotlin/de/gesellix/docker/compose/adapters/ListToPortConfigsAdapter.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ class ListToPortConfigsAdapter {
116116
if (startPort == endPort && startHostPort != endHostPort) {
117117
hostPort = "$hostPort-$endHostPort"
118118
}
119-
val port = newPort(proto.toLowerCase(), containerPort)
119+
val port = newPort(proto.lowercase(), containerPort)
120120
portMappings.add(hashMapOf<String, Any>().let { mapping ->
121121
mapping["port"] = port
122122
mapping["binding"] = hashMapOf<String, Any>().let { binding ->
123-
binding["proto"] = proto.toLowerCase()
123+
binding["proto"] = proto.lowercase()
124124
binding["hostIP"] = rawIP
125125
binding["hostPort"] = hostPort
126126
binding
@@ -193,7 +193,7 @@ class ListToPortConfigsAdapter {
193193
}
194194

195195
private fun validateProto(proto: String) {
196-
if (!listOf("tcp", "udp").contains(proto.toLowerCase())) {
196+
if (!listOf("tcp", "udp").contains(proto.lowercase())) {
197197
throw IllegalStateException("Invalid proto '$proto'")
198198
}
199199
}

0 commit comments

Comments
 (0)