Fix off-by-one error in parseLocaleString
Fix off-by-one error in StringUtils.parseLocaleString() Issue: SPR-10364
This commit is contained in:
parent
e80b7d1e22
commit
e7f89f87c1
|
|
@ -688,7 +688,7 @@ public abstract class StringUtils {
|
|||
validateLocalePart(language);
|
||||
validateLocalePart(country);
|
||||
String variant = "";
|
||||
if (parts.length >= 2) {
|
||||
if (parts.length > 2) {
|
||||
// There is definitely a variant, and it is everything after the country
|
||||
// code sans the separator between the country code and the variant.
|
||||
int endIndexOfCountryCode = localeString.lastIndexOf(country) + country.length();
|
||||
|
|
|
|||
Loading…
Reference in New Issue