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

@@ -18,6 +18,7 @@ package org.springframework.data.geo;
import static org.assertj.core.api.Assertions.*;
import java.util.Arrays;
import java.util.Collections;
import org.junit.Test;
import org.springframework.util.SerializationUtils;
@@ -45,7 +46,7 @@ public class GeoResultsUnitTests {
public void testSerialization() {
GeoResult<String> result = new GeoResult<>("test", new Distance(2));
GeoResults<String> geoResults = new GeoResults<>(Arrays.asList(result));
GeoResults<String> geoResults = new GeoResults<>(Collections.singletonList(result));
@SuppressWarnings("unchecked")
GeoResults<String> serialized = (GeoResults<String>) SerializationUtils