Commit dc363601 authored by Andy Wilkinson's avatar Andy Wilkinson

Polish

parent 9640881f
...@@ -82,7 +82,7 @@ public class ExposeExcludePropertyEndpointFilter<E extends ExposableEndpoint<?>> ...@@ -82,7 +82,7 @@ public class ExposeExcludePropertyEndpointFilter<E extends ExposableEndpoint<?>>
if (items == null) { if (items == null) {
return Collections.emptySet(); return Collections.emptySet();
} }
return items.stream().map(item -> item.toLowerCase(Locale.ENGLISH)) return items.stream().map((item) -> item.toLowerCase(Locale.ENGLISH))
.collect(Collectors.toCollection(HashSet::new)); .collect(Collectors.toCollection(HashSet::new));
} }
......
...@@ -98,7 +98,7 @@ public class MessageSourceAutoConfigurationTests { ...@@ -98,7 +98,7 @@ public class MessageSourceAutoConfigurationTests {
private ContextConsumer<AssertableApplicationContext> assertCache(long expected) { private ContextConsumer<AssertableApplicationContext> assertCache(long expected) {
return (context) -> { return (context) -> {
assertThat(assertThat(context).hasSingleBean(MessageSource.class)); assertThat(context).hasSingleBean(MessageSource.class);
assertThat(new DirectFieldAccessor(context.getBean(MessageSource.class)) assertThat(new DirectFieldAccessor(context.getBean(MessageSource.class))
.getPropertyValue("cacheMillis")).isEqualTo(expected); .getPropertyValue("cacheMillis")).isEqualTo(expected);
}; };
......
...@@ -69,9 +69,7 @@ class OriginTrackedYamlLoader extends YamlProcessor { ...@@ -69,9 +69,7 @@ class OriginTrackedYamlLoader extends YamlProcessor {
public List<Map<String, Object>> load() { public List<Map<String, Object>> load() {
final List<Map<String, Object>> result = new ArrayList<>(); final List<Map<String, Object>> result = new ArrayList<>();
process((properties, map) -> { process((properties, map) -> result.add(getFlattenedMap(map)));
result.add(getFlattenedMap(map));
});
return result; return result;
} }
......
...@@ -87,8 +87,8 @@ public class StringToEnumIgnoringCaseConverterFactoryTests { ...@@ -87,8 +87,8 @@ public class StringToEnumIgnoringCaseConverterFactoryTests {
Locale.setDefault(new Locale("tr")); Locale.setDefault(new Locale("tr"));
LocaleSensitiveEnum result = this.conversionService.convert( LocaleSensitiveEnum result = this.conversionService.convert(
"accept-case-insensitive-properties", LocaleSensitiveEnum.class); "accept-case-insensitive-properties", LocaleSensitiveEnum.class);
assertThat(result assertThat(result)
.equals(LocaleSensitiveEnum.ACCEPT_CASE_INSENSITIVE_PROPERTIES)); .isEqualTo(LocaleSensitiveEnum.ACCEPT_CASE_INSENSITIVE_PROPERTIES);
} }
finally { finally {
Locale.setDefault(defaultLocale); Locale.setDefault(defaultLocale);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment