Updates to*Case() to use Locale.ROOT
This commit is contained in:
committed by
Oleg Zhurakousky
parent
b65577d515
commit
900d03f816
@@ -1,5 +1,6 @@
|
||||
package function.example;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
@@ -31,7 +32,7 @@ public class SimpleFunctionAppApplication {
|
||||
return person -> {
|
||||
Person p = new Person();
|
||||
p.setId(person.getId());
|
||||
p.setName(person.getName().toUpperCase());
|
||||
p.setName(person.getName().toUpperCase(Locale.ROOT));
|
||||
return p;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package function.example;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class UpperCaseFunction implements Function<String, String> {
|
||||
@@ -7,7 +8,7 @@ public class UpperCaseFunction implements Function<String, String> {
|
||||
@Override
|
||||
public String apply(String value) {
|
||||
System.out.println("Uppercasing " + value);
|
||||
return value.toUpperCase();
|
||||
return value.toUpperCase(Locale.ROOT);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user