Updates to*Case() to use Locale.ROOT

This commit is contained in:
spencergibb
2024-10-18 10:53:24 -04:00
parent 8f9c17f19a
commit d120eb0731
83 changed files with 262 additions and 178 deletions

View File

@@ -17,6 +17,7 @@
package com.example;
import java.time.Duration;
import java.util.Locale;
import java.util.function.Function;
import java.util.function.Supplier;
@@ -38,17 +39,17 @@ public class SampleApplication {
@Bean
public Function<String, String> uppercase() {
return value -> value.toUpperCase();
return value -> value.toUpperCase(Locale.ROOT);
}
@Bean
public Function<Message<String>, Integer> uppercaseMessage() {
return value -> value.getPayload().toUpperCase().length();
return value -> value.getPayload().toUpperCase(Locale.ROOT).length();
}
@Bean
public Function<Flux<String>, Flux<String>> lowercase() {
return flux -> flux.map(value -> value.toLowerCase());
return flux -> flux.map(value -> value.toLowerCase(Locale.ROOT));
}
@Bean