Replace explicit generics with diamond operator

Where possible, explicit generic declarations to use the Java 8 diamond
operator.

See gh-9781
This commit is contained in:
Emanuel Campolo
2017-07-18 11:50:10 -03:00
committed by Phillip Webb
parent eb35fc9fa6
commit 04fdec6f8b
44 changed files with 64 additions and 68 deletions

View File

@@ -58,7 +58,7 @@ public abstract class AbstractEmbeddedServletContainerIntegrationTests {
private static List<Object> createParameters(String packaging, String container,
List<Class<? extends AbstractApplicationLauncher>> applicationLaunchers) {
List<Object> parameters = new ArrayList<Object>();
List<Object> parameters = new ArrayList<>();
ApplicationBuilder applicationBuilder = new ApplicationBuilder(temporaryFolder,
packaging, container);
for (Class<? extends AbstractApplicationLauncher> launcherClass : applicationLaunchers) {

View File

@@ -56,7 +56,7 @@ class BootRunApplicationLauncher extends AbstractApplicationLauncher {
if (archive.getName().endsWith(".war")) {
populateSrcMainWebapp();
}
List<String> classpath = new ArrayList<String>();
List<String> classpath = new ArrayList<>();
classpath.add(targetClasses.getAbsolutePath());
for (File dependency : dependencies.listFiles()) {
classpath.add(dependency.getAbsolutePath());

View File

@@ -67,7 +67,7 @@ class IdeApplicationLauncher extends AbstractApplicationLauncher {
if (archive.getName().endsWith(".war")) {
populateSrcMainWebapp();
}
List<String> classpath = new ArrayList<String>();
List<String> classpath = new ArrayList<>();
classpath.add(targetClasses.getAbsolutePath());
for (File dependency : dependencies.listFiles()) {
classpath.add(dependency.getAbsolutePath());