LocaleEditor and StringToLocaleConverter do not restrict variant part through validation (SPR-8637)
This commit is contained in:
@@ -566,6 +566,16 @@ public class StringUtilsTests extends TestCase {
|
||||
assertNull("When given an empty Locale string, must return null.", locale);
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="http://opensource.atlassian.com/projects/spring/browse/SPR-8637">See SPR-8637</a>.
|
||||
*/
|
||||
public void testParseLocaleWithMultiSpecialCharactersInVariant() throws Exception {
|
||||
final String variant = "proper-northern";
|
||||
final String localeString = "en_GB_" + variant;
|
||||
Locale locale = StringUtils.parseLocaleString(localeString);
|
||||
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
|
||||
}
|
||||
|
||||
/**
|
||||
* <a href="http://opensource.atlassian.com/projects/spring/browse/SPR-3671">See SPR-3671</a>.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user