Remove redundant explicit types
See gh-18754
This commit is contained in:
committed by
Stephane Nicoll
parent
ee0a66a2af
commit
9ece2e277f
@@ -80,7 +80,7 @@ abstract class HealthEndpointSupport<C, T> {
|
||||
Object contributor = getContributor(path, pathOffset);
|
||||
T health = getContribution(apiVersion, group, contributor, showComponents, showDetails,
|
||||
isSystemHealth ? this.groups.getNames() : null);
|
||||
return (health != null) ? new HealthResult<T>(health, group) : null;
|
||||
return (health != null) ? new HealthResult<>(health, group) : null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -66,7 +66,7 @@ public class SimpleHttpCodeStatusMapper implements HttpCodeStatusMapper {
|
||||
}
|
||||
|
||||
private static Map<String, Integer> getUniformMappings(Map<String, Integer> mappings) {
|
||||
Map<String, Integer> result = new LinkedHashMap<String, Integer>();
|
||||
Map<String, Integer> result = new LinkedHashMap<>();
|
||||
for (Map.Entry<String, Integer> entry : mappings.entrySet()) {
|
||||
String code = getUniformCode(entry.getKey());
|
||||
if (code != null) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class SimpleStatusAggregator implements StatusAggregator {
|
||||
|
||||
private static final List<String> DEFAULT_ORDER;
|
||||
static {
|
||||
List<String> defaultOrder = new ArrayList<String>();
|
||||
List<String> defaultOrder = new ArrayList<>();
|
||||
defaultOrder.add(Status.DOWN.getCode());
|
||||
defaultOrder.add(Status.OUT_OF_SERVICE.getCode());
|
||||
defaultOrder.add(Status.UP.getCode());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user