Apply "type inference for generic instance creation" Java 7 feature

Change-Id: Ia14802c903ca67b9d94dc6038d70b0e9644bc621
This commit is contained in:
David Ostrovsky
2014-04-26 15:27:57 +02:00
parent 40a179b8ca
commit e73ae61339
224 changed files with 557 additions and 633 deletions

View File

@@ -192,7 +192,7 @@ public final class GerritLauncher {
throw e;
}
final SortedMap<String, URL> jars = new TreeMap<String, URL>();
final SortedMap<String, URL> jars = new TreeMap<>();
try {
final ZipFile zf = new ZipFile(path);
try {
@@ -220,7 +220,7 @@ public final class GerritLauncher {
// The extension API needs to be its own ClassLoader, along
// with a few of its dependencies. Try to construct this first.
List<URL> extapi = new ArrayList<URL>();
List<URL> extapi = new ArrayList<>();
move(jars, "gerrit-extension-api-", extapi);
move(jars, "guice-", extapi);
move(jars, "javax.inject-1.jar", extapi);
@@ -592,7 +592,7 @@ public final class GerritLauncher {
private static ClassLoader useDevClasspath()
throws MalformedURLException, FileNotFoundException {
File out = getDeveloperBuckOut();
List<URL> dirs = new ArrayList<URL>();
List<URL> dirs = new ArrayList<>();
dirs.add(new File(new File(out, "eclipse"), "classes").toURI().toURL());
ClassLoader cl = GerritLauncher.class.getClassLoader();
for (URL u : ((URLClassLoader) cl).getURLs()) {