Skip to content

Commit ed19dc7

Browse files
committed
Polishing
1 parent 7902f63 commit ed19dc7

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

spring-core/src/test/java/org/springframework/util/StringUtilsTests.java

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -618,51 +618,50 @@ public void testParseLocaleStringWithEmptyLocaleStringYieldsNullLocale() throws
618618
assertNull("When given an empty Locale string, must return null.", locale);
619619
}
620620

621-
// SPR-8637
622-
@Test
621+
@Test // SPR-8637
623622
public void testParseLocaleWithMultiSpecialCharactersInVariant() throws Exception {
624-
final String variant = "proper-northern";
625-
final String localeString = "en_GB_" + variant;
623+
String variant = "proper-northern";
624+
String localeString = "en_GB_" + variant;
626625
Locale locale = StringUtils.parseLocaleString(localeString);
627626
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
628627
}
629628

630629
@Test // SPR-3671
631630
public void testParseLocaleWithMultiValuedVariant() throws Exception {
632-
final String variant = "proper_northern";
633-
final String localeString = "en_GB_" + variant;
631+
String variant = "proper_northern";
632+
String localeString = "en_GB_" + variant;
634633
Locale locale = StringUtils.parseLocaleString(localeString);
635634
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
636635
}
637636

638637
@Test // SPR-3671
639638
public void testParseLocaleWithMultiValuedVariantUsingSpacesAsSeparators() throws Exception {
640-
final String variant = "proper northern";
641-
final String localeString = "en GB " + variant;
639+
String variant = "proper northern";
640+
String localeString = "en GB " + variant;
642641
Locale locale = StringUtils.parseLocaleString(localeString);
643642
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
644643
}
645644

646645
@Test // SPR-3671
647646
public void testParseLocaleWithMultiValuedVariantUsingMixtureOfUnderscoresAndSpacesAsSeparators() throws Exception {
648-
final String variant = "proper northern";
649-
final String localeString = "en_GB_" + variant;
647+
String variant = "proper northern";
648+
String localeString = "en_GB_" + variant;
650649
Locale locale = StringUtils.parseLocaleString(localeString);
651650
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
652651
}
653652

654653
@Test // SPR-3671
655654
public void testParseLocaleWithMultiValuedVariantUsingSpacesAsSeparatorsWithLotsOfLeadingWhitespace() throws Exception {
656-
final String variant = "proper northern";
657-
final String localeString = "en GB " + variant; // lots of whitespace
655+
String variant = "proper northern";
656+
String localeString = "en GB " + variant; // lots of whitespace
658657
Locale locale = StringUtils.parseLocaleString(localeString);
659658
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
660659
}
661660

662661
@Test // SPR-3671
663662
public void testParseLocaleWithMultiValuedVariantUsingUnderscoresAsSeparatorsWithLotsOfLeadingWhitespace() throws Exception {
664-
final String variant = "proper_northern";
665-
final String localeString = "en_GB_____" + variant; // lots of underscores
663+
String variant = "proper_northern";
664+
String localeString = "en_GB_____" + variant; // lots of underscores
666665
Locale locale = StringUtils.parseLocaleString(localeString);
667666
assertEquals("Multi-valued variant portion of the Locale not extracted correctly.", variant, locale.getVariant());
668667
}

0 commit comments

Comments
 (0)