StringUtils.parseLocaleString accepts Java 7 variants
Issue: SPR-14718
This commit is contained in:
@@ -715,7 +715,7 @@ public abstract class StringUtils {
|
||||
private static void validateLocalePart(String localePart) {
|
||||
for (int i = 0; i < localePart.length(); i++) {
|
||||
char ch = localePart.charAt(i);
|
||||
if (ch != '_' && ch != ' ' && !Character.isLetterOrDigit(ch)) {
|
||||
if (ch != ' ' && ch != '_' && ch != '#' && !Character.isLetterOrDigit(ch)) {
|
||||
throw new IllegalArgumentException(
|
||||
"Locale part \"" + localePart + "\" contains invalid characters");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user