DATACMNS-867 - Additional Java 8 language feature cleanup.

Make use of lambdas and method references though out the codebase. Remove no longer required generic type parameters.
Additionally remove unused imports and replace single element list initialization with dedicated singletonList.
Use Assertion overloads taking Supplier for dynamic assertion error messages.
This commit is contained in:
Christoph Strobl
2017-02-15 12:06:09 +01:00
committed by Oliver Gierke
parent aa4c51e1ea
commit be347eaaab
176 changed files with 673 additions and 797 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2017 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.
@@ -35,6 +35,7 @@ import org.springframework.util.StringUtils;
* {@value #SUPPORTED_METRICS}.
*
* @author Oliver Gierke
* @author Christoph Strobl
*/
public enum DistanceFormatter implements Converter<String, Distance>, Formatter<Distance> {
@@ -45,7 +46,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
static {
Map<String, Metric> metrics = new LinkedHashMap<String, Metric>();
Map<String, Metric> metrics = new LinkedHashMap<>();
for (Metric metric : Metrics.values()) {
metrics.put(metric.getAbbreviation(), metric);