Cleanup and format code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -89,7 +89,7 @@ public class AbstractExecutableArchiveLauncherTests {
|
||||
}
|
||||
|
||||
protected Set<URL> getUrls(List<Archive> archives) throws MalformedURLException {
|
||||
Set<URL> urls = new HashSet<URL>(archives.size());
|
||||
Set<URL> urls = new HashSet<>(archives.size());
|
||||
for (Archive archive : archives) {
|
||||
urls.add(archive.getUrl());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -188,7 +188,7 @@ public class ExplodedArchiveTests {
|
||||
}
|
||||
|
||||
private Map<String, Archive.Entry> getEntriesMap(Archive archive) {
|
||||
Map<String, Archive.Entry> entries = new HashMap<String, Archive.Entry>();
|
||||
Map<String, Archive.Entry> entries = new HashMap<>();
|
||||
for (Archive.Entry entry : archive) {
|
||||
entries.put(entry.getName(), entry);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -121,7 +121,7 @@ public class JarFileArchiveTests {
|
||||
}
|
||||
|
||||
private Map<String, Archive.Entry> getEntriesMap(Archive archive) {
|
||||
Map<String, Archive.Entry> entries = new HashMap<String, Archive.Entry>();
|
||||
Map<String, Archive.Entry> entries = new HashMap<>();
|
||||
for (Archive.Entry entry : archive) {
|
||||
entries.put(entry.getName(), entry);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
* Copyright 2012-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.
|
||||
@@ -276,7 +276,7 @@ public class RandomAccessDataFileTests {
|
||||
@Test
|
||||
public void concurrentReads() throws Exception {
|
||||
ExecutorService executorService = Executors.newFixedThreadPool(20);
|
||||
List<Future<Boolean>> results = new ArrayList<Future<Boolean>>();
|
||||
List<Future<Boolean>> results = new ArrayList<>();
|
||||
for (int i = 0; i < 100; i++) {
|
||||
results.add(executorService.submit(new Callable<Boolean>() {
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class CentralDirectoryParserTests {
|
||||
|
||||
private static class Collector implements CentralDirectoryVisitor {
|
||||
|
||||
private List<CentralDirectoryFileHeader> headers = new ArrayList<CentralDirectoryFileHeader>();
|
||||
private List<CentralDirectoryFileHeader> headers = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void visitStart(CentralDirectoryEndRecord endRecord,
|
||||
@@ -111,7 +111,7 @@ public class CentralDirectoryParserTests {
|
||||
|
||||
private static class MockCentralDirectoryVisitor implements CentralDirectoryVisitor {
|
||||
|
||||
private final List<String> invocations = new ArrayList<String>();
|
||||
private final List<String> invocations = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void visitStart(CentralDirectoryEndRecord endRecord,
|
||||
|
||||
Reference in New Issue
Block a user