File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
spring-boot/src/test/java/org/springframework/boot/bind Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,16 @@ public class RelaxedConversionServiceTests {
36
36
37
37
@ Test
38
38
public void conversionServiceShouldAlwaysUseLocaleEnglish () {
39
- Locale .setDefault (new Locale ("tr" ));
40
- TestEnum result = this .conversionService
41
- .convert ("accept-case-insensitive-properties" , TestEnum .class );
42
- assertThat (result .equals (TestEnum .ACCEPT_CASE_INSENSITIVE_PROPERTIES ));
39
+ Locale defaultLocale = Locale .getDefault ();
40
+ try {
41
+ Locale .setDefault (new Locale ("tr" ));
42
+ TestEnum result = this .conversionService
43
+ .convert ("accept-case-insensitive-properties" , TestEnum .class );
44
+ assertThat (result .equals (TestEnum .ACCEPT_CASE_INSENSITIVE_PROPERTIES ));
45
+ }
46
+ finally {
47
+ Locale .setDefault (defaultLocale );
48
+ }
43
49
}
44
50
45
51
enum TestEnum {
You can’t perform that action at this time.
0 commit comments