Enable deprecation compilation warnings
See gh-21271
This commit is contained in:
@@ -25,6 +25,7 @@ import java.net.URLClassLoader;
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.jar.Attributes;
|
||||
@@ -289,7 +290,7 @@ class PropertiesLauncherTests {
|
||||
assertThat(loader.getClass().getName()).isEqualTo(TestLoader.class.getName());
|
||||
}
|
||||
|
||||
private List<Archive> archives() throws Exception {
|
||||
private Iterator<Archive> archives() throws Exception {
|
||||
List<Archive> archives = new ArrayList<>();
|
||||
String path = System.getProperty("java.class.path");
|
||||
for (String url : path.split(File.pathSeparator)) {
|
||||
@@ -298,7 +299,7 @@ class PropertiesLauncherTests {
|
||||
archives.add(archive);
|
||||
}
|
||||
}
|
||||
return archives;
|
||||
return archives.iterator();
|
||||
}
|
||||
|
||||
private Archive archive(String url) throws IOException {
|
||||
|
||||
@@ -148,6 +148,7 @@ class JarFileArchiveTests {
|
||||
File file = new File(this.tempDir, "test.jar");
|
||||
FileCopyUtils.copy(writeZip64Jar(), file);
|
||||
try (JarFileArchive zip64Archive = new JarFileArchive(file)) {
|
||||
@SuppressWarnings("deprecation")
|
||||
Iterator<Entry> entries = zip64Archive.iterator();
|
||||
for (int i = 0; i < 65537; i++) {
|
||||
assertThat(entries.hasNext()).as(i + "nth file is present").isTrue();
|
||||
|
||||
Reference in New Issue
Block a user