Remove redundant explicit types

See gh-18754
This commit is contained in:
dreis2211
2019-10-26 23:34:08 +02:00
committed by Stephane Nicoll
parent ee0a66a2af
commit 9ece2e277f
11 changed files with 11 additions and 12 deletions

View File

@@ -177,8 +177,7 @@ class HealthEndpointWebIntegrationTests {
ReactiveHealthContributorRegistry reactiveHealthContributorRegistry(
Map<String, HealthContributor> healthContributorBeans,
Map<String, ReactiveHealthContributor> reactiveHealthContributorBeans) {
Map<String, ReactiveHealthContributor> allIndicators = new LinkedHashMap<String, ReactiveHealthContributor>(
reactiveHealthContributorBeans);
Map<String, ReactiveHealthContributor> allIndicators = new LinkedHashMap<>(reactiveHealthContributorBeans);
healthContributorBeans.forEach((name, contributor) -> allIndicators.computeIfAbsent(name,
(key) -> ReactiveHealthContributor.adapt(contributor)));
return new DefaultReactiveHealthContributorRegistry(allIndicators);

View File

@@ -91,7 +91,7 @@ class NamedContributorsMapAdapterTests {
}
private TestNamedContributorsMapAdapter<String> createAdapter() {
Map<String, String> map = new LinkedHashMap<String, String>();
Map<String, String> map = new LinkedHashMap<>();
map.put("one", "one");
map.put("two", "two");
TestNamedContributorsMapAdapter<String> adapter = new TestNamedContributorsMapAdapter<>(map, this::reverse);