diff --git a/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedConversionService.java b/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedConversionService.java index 5916df0cd80..cd21a80f422 100644 --- a/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedConversionService.java +++ b/spring-boot/src/main/java/org/springframework/boot/bind/RelaxedConversionService.java @@ -127,9 +127,8 @@ class RelaxedConversionService implements ConversionService { } source = source.trim(); for (T candidate : (Set) EnumSet.allOf(this.enumType)) { - RelaxedNames names = new RelaxedNames( - candidate.name().replace('_', '-') - .toLowerCase(Locale.ENGLISH)); + RelaxedNames names = new RelaxedNames(candidate.name() + .replace('_', '-').toLowerCase(Locale.ENGLISH)); for (String name : names) { if (name.equals(source)) { return candidate; diff --git a/spring-boot/src/test/java/org/springframework/boot/bind/RelaxedConversionServiceTests.java b/spring-boot/src/test/java/org/springframework/boot/bind/RelaxedConversionServiceTests.java index f39b6bebb20..706be69c5c4 100644 --- a/spring-boot/src/test/java/org/springframework/boot/bind/RelaxedConversionServiceTests.java +++ b/spring-boot/src/test/java/org/springframework/boot/bind/RelaxedConversionServiceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2016 the original author or authors. + * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,13 +31,14 @@ import static org.assertj.core.api.Assertions.assertThat; */ public class RelaxedConversionServiceTests { - private RelaxedConversionService conversionService = new RelaxedConversionService(new DefaultConversionService()); + private RelaxedConversionService conversionService = new RelaxedConversionService( + new DefaultConversionService()); @Test public void conversionServiceShouldAlwaysUseLocaleEnglish() { Locale.setDefault(new Locale("tr")); - TestEnum result = this.conversionService.convert("accept-case-insensitive-properties", - TestEnum.class); + TestEnum result = this.conversionService + .convert("accept-case-insensitive-properties", TestEnum.class); assertThat(result.equals(TestEnum.ACCEPT_CASE_INSENSITIVE_PROPERTIES)); }