Updates to*Case() to use Locale.ROOT
This commit is contained in:
committed by
Oleg Zhurakousky
parent
b65577d515
commit
900d03f816
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.cloud.function.adapter.aws;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -219,7 +220,7 @@ public class CustomRuntimeEventLoopTest {
|
||||
protected static class SingleFunctionConfiguration {
|
||||
@Bean
|
||||
public Function<String, String> uppercase() {
|
||||
return v -> v.toUpperCase();
|
||||
return v -> v.toUpperCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,7 +237,7 @@ public class CustomRuntimeEventLoopTest {
|
||||
protected static class MultipleFunctionConfiguration {
|
||||
@Bean
|
||||
public Function<String, String> uppercase() {
|
||||
return v -> v.toUpperCase();
|
||||
return v -> v.toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -246,7 +247,7 @@ public class CustomRuntimeEventLoopTest {
|
||||
|
||||
@Bean
|
||||
public Function<Person, Person> uppercasePerson() {
|
||||
return p -> new Person(p.getName().toUpperCase());
|
||||
return p -> new Person(p.getName().toUpperCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -267,7 +268,7 @@ public class CustomRuntimeEventLoopTest {
|
||||
|
||||
@Override
|
||||
public Person apply(Person input) {
|
||||
return new Person(input.getName().toUpperCase());
|
||||
return new Person(input.getName().toUpperCase(Locale.ROOT));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
@@ -1492,7 +1493,7 @@ public class FunctionInvokerTests {
|
||||
@Bean
|
||||
public Function<Message<String>, Message<String>> uppercase() {
|
||||
return v -> {
|
||||
return MessageBuilder.withPayload(v.getPayload().toUpperCase()).build();
|
||||
return MessageBuilder.withPayload(v.getPayload().toUpperCase(Locale.ROOT)).build();
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1525,7 +1526,7 @@ public class FunctionInvokerTests {
|
||||
|
||||
@Bean
|
||||
public Function<String, String> uppercase() {
|
||||
return v -> v.toUpperCase();
|
||||
return v -> v.toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -1784,7 +1785,7 @@ public class FunctionInvokerTests {
|
||||
|
||||
@Bean
|
||||
public Function<String, String> uppercase() {
|
||||
return v -> v.toUpperCase();
|
||||
return v -> v.toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -1795,7 +1796,7 @@ public class FunctionInvokerTests {
|
||||
@Bean
|
||||
public Function<Person, String> uppercasePojo() {
|
||||
return v -> {
|
||||
return v.getName().toUpperCase();
|
||||
return v.getName().toUpperCase(Locale.ROOT);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1803,7 +1804,7 @@ public class FunctionInvokerTests {
|
||||
public Function<Person, Person> uppercasePojoReturnPojo() {
|
||||
return v -> {
|
||||
Person p = new Person();
|
||||
p.setName(v.getName().toUpperCase());
|
||||
p.setName(v.getName().toUpperCase(Locale.ROOT));
|
||||
return p;
|
||||
};
|
||||
}
|
||||
@@ -1812,7 +1813,7 @@ public class FunctionInvokerTests {
|
||||
public Function<Flux<Person>, Flux<Person>> uppercasePojoReturnPojoReactive() {
|
||||
return flux -> flux.map(v -> {
|
||||
Person p = new Person();
|
||||
p.setName(v.getName().toUpperCase());
|
||||
p.setName(v.getName().toUpperCase(Locale.ROOT));
|
||||
return p;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user