Use the diamond syntax

Closes gh-1450
This commit is contained in:
diguage
2017-06-05 19:20:22 +08:00
committed by Stephane Nicoll
parent ca1e682dc4
commit c1d44d9a34
16 changed files with 23 additions and 24 deletions

View File

@@ -52,7 +52,7 @@ class DefaultRenderingResponseBuilder implements RenderingResponse.Builder {
private final HttpHeaders headers = new HttpHeaders();
private final Map<String, Object> model = new LinkedHashMap<String, Object>();
private final Map<String, Object> model = new LinkedHashMap<>();
public DefaultRenderingResponseBuilder(String name) {

View File

@@ -61,7 +61,7 @@ public final class HeadersRequestCondition extends AbstractRequestCondition<Head
private static Collection<HeaderExpression> parseExpressions(String... headers) {
Set<HeaderExpression> expressions = new LinkedHashSet<HeaderExpression>();
Set<HeaderExpression> expressions = new LinkedHashSet<>();
if (headers != null) {
for (String header : headers) {
HeaderExpression expr = new HeaderExpression(header);

View File

@@ -301,7 +301,7 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
protected HandlerMethod lookupHandlerMethod(String lookupPath, ServerWebExchange exchange)
throws Exception {
List<Match> matches = new ArrayList<Match>();
List<Match> matches = new ArrayList<>();
List<T> directPathMatches = this.mappingRegistry.getMappingsByUrl(lookupPath);
if (directPathMatches != null) {
addMatchingMappings(directPathMatches, matches, exchange);