Skip to content

Commit 8f9c067

Browse files
committed
Polish
1 parent 257e324 commit 8f9c067

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

spring-boot/src/main/java/org/springframework/boot/bind/RelaxedConversionService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,8 @@ public T convert(String source) {
127127
}
128128
source = source.trim();
129129
for (T candidate : (Set<T>) EnumSet.allOf(this.enumType)) {
130-
RelaxedNames names = new RelaxedNames(
131-
candidate.name().replace('_', '-')
132-
.toLowerCase(Locale.ENGLISH));
130+
RelaxedNames names = new RelaxedNames(candidate.name()
131+
.replace('_', '-').toLowerCase(Locale.ENGLISH));
133132
for (String name : names) {
134133
if (name.equals(source)) {
135134
return candidate;

spring-boot/src/test/java/org/springframework/boot/bind/RelaxedConversionServiceTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -31,13 +31,14 @@
3131
*/
3232
public class RelaxedConversionServiceTests {
3333

34-
private RelaxedConversionService conversionService = new RelaxedConversionService(new DefaultConversionService());
34+
private RelaxedConversionService conversionService = new RelaxedConversionService(
35+
new DefaultConversionService());
3536

3637
@Test
3738
public void conversionServiceShouldAlwaysUseLocaleEnglish() {
3839
Locale.setDefault(new Locale("tr"));
39-
TestEnum result = this.conversionService.convert("accept-case-insensitive-properties",
40-
TestEnum.class);
40+
TestEnum result = this.conversionService
41+
.convert("accept-case-insensitive-properties", TestEnum.class);
4142
assertThat(result.equals(TestEnum.ACCEPT_CASE_INSENSITIVE_PROPERTIES));
4243
}
4344

0 commit comments

Comments
 (0)