Skip to content

Commit

Permalink
Updated toLowerCase() to toLowerCase(Locale.ROOT) and toUpperCase() t…
Browse files Browse the repository at this point in the history
…o toUpperCase(Locale.ROOT)

Fixes spring-cloud#489
  • Loading branch information
Corneil du Plessis committed Nov 7, 2024
1 parent 98d9f38 commit bf1df97
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public String apply(String value) {

@Override
public String apply(String value) {
return (value.isEmpty() ? value : value.toLowerCase(Locale.ENGLISH));
return (value.isEmpty() ? value : value.toLowerCase(Locale.ROOT));
}

},
Expand All @@ -99,7 +99,7 @@ public String apply(String value) {

@Override
public String apply(String value) {
return (value.isEmpty() ? value : value.toUpperCase(Locale.ENGLISH));
return (value.isEmpty() ? value : value.toUpperCase(Locale.ROOT));
}

};
Expand Down Expand Up @@ -224,7 +224,7 @@ private static String separatedToCamelCase(String value,
}
StringBuilder builder = new StringBuilder();
for (String field : SEPARATED_TO_CAMEL_CASE_PATTERN.split(value)) {
field = (caseInsensitive ? field.toLowerCase(Locale.ENGLISH) : field);
field = (caseInsensitive ? field.toLowerCase(Locale.ROOT) : field);
builder.append(
builder.length() != 0 ? StringUtils.capitalize(field) : field);
}
Expand Down

0 comments on commit bf1df97

Please sign in to comment.