Call String.toLowerCase and .toUppercase with explicit locale

Closes gh-42719
This commit is contained in:
Moritz Halbritter
2024-10-17 13:20:15 +02:00
parent 666e0c1a53
commit a3060652f8
25 changed files with 54 additions and 29 deletions

View File

@@ -16,6 +16,8 @@
package org.springframework.boot.docs.messaging.kafka.streams;
import java.util.Locale;
import org.apache.kafka.common.serialization.Serdes;
import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.StreamsBuilder;
@@ -39,7 +41,7 @@ public class MyKafkaStreamsConfiguration {
}
private KeyValue<Integer, String> uppercaseValue(Integer key, String value) {
return new KeyValue<>(key, value.toUpperCase());
return new KeyValue<>(key, value.toUpperCase(Locale.getDefault()));
}
}