Polish “Remove or use unused method parameters”

Closes gh-11812
This commit is contained in:
Andy Wilkinson
2018-02-01 20:36:47 +00:00
parent 717bd2c580
commit 875091ed85
25 changed files with 76 additions and 106 deletions

View File

@@ -53,7 +53,7 @@ class RequestPredicateFactory {
public WebOperationRequestPredicate getRequestPredicate(String endpointId,
String rootPath, DiscoveredOperationMethod operationMethod) {
Method method = operationMethod.getMethod();
String path = getPath(endpointId, rootPath, method);
String path = getPath(rootPath, method);
WebEndpointHttpMethod httpMethod = determineHttpMethod(
operationMethod.getOperationType());
Collection<String> consumes = getConsumes(httpMethod, method);
@@ -61,7 +61,7 @@ class RequestPredicateFactory {
return new WebOperationRequestPredicate(path, httpMethod, consumes, produces);
}
private String getPath(String endpointId, String rootPath, Method method) {
private String getPath(String rootPath, Method method) {
return rootPath + Stream.of(method.getParameters()).filter(this::hasSelector)
.map(this::slashName).collect(Collectors.joining());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 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.
@@ -62,7 +62,7 @@ public class DataSourcePoolMetrics implements MeterBinder {
Assert.notNull(dataSource, "DataSource must not be null");
Assert.notNull(metadataProvider, "MetadataProvider must not be null");
this.dataSource = dataSource;
this.metadataProvider = new CachingDataSourcePoolMetadataProvider(dataSource,
this.metadataProvider = new CachingDataSourcePoolMetadataProvider(
metadataProvider);
this.name = name;
this.tags = tags;
@@ -97,7 +97,7 @@ public class DataSourcePoolMetrics implements MeterBinder {
private final DataSourcePoolMetadataProvider metadataProvider;
CachingDataSourcePoolMetadataProvider(DataSource dataSource,
CachingDataSourcePoolMetadataProvider(
DataSourcePoolMetadataProvider metadataProvider) {
this.metadataProvider = metadataProvider;
}