[11u] RFR(XS) 8231247: (zipfs) Test failure in jdk/nio/zipfs/InvalidZipHeaderTests.java after backport of JDK-8222807
Langer, Christoph
christoph.langer at sap.com
Thu Sep 19 12:37:14 UTC 2019
Hi,
due to a flaw in our testing system, I just discovered that the test jdk/nio/zipfs/InvalidZipHeaderTests.java from JDK-8222807 would not work in JDK11 after the backport was pushed. The required FileSystems::newFileSystem method was only added in JDK13.
Please review this small fix to make it work:
diff -r 9283080c1e8b -r 7c846f723590 test/jdk/jdk/nio/zipfs/InvalidZipHeaderTests.java
--- a/test/jdk/jdk/nio/zipfs/InvalidZipHeaderTests.java Thu Jul 18 10:25:49 2019 +0200
+++ b/test/jdk/jdk/nio/zipfs/InvalidZipHeaderTests.java Thu Sep 19 13:26:10 2019 +0100
@@ -80,7 +80,7 @@
public void walkInvalidHeaderTest(String startPath, List<String> expectedPaths)
throws IOException {
try (FileSystem zipfs =
- FileSystems.newFileSystem(Path.of(INVALID_JAR_FILE))) {
+ FileSystems.newFileSystem(Path.of(INVALID_JAR_FILE), null)) {
List<String> result = walk(zipfs.getPath(startPath))
.map(f -> f.toString()).collect(Collectors.toList());
assertTrue(result.equals(expectedPaths),
Thanks
Christoph
More information about the jdk-updates-dev
mailing list