From 35b8cbc776749ec44cce9cdb631fdd5acd25ce7b Mon Sep 17 00:00:00 2001 From: Justin Lu Date: Wed, 25 Mar 2026 09:43:23 -0700 Subject: [PATCH] Reflect Lance's comments --- test/jdk/jdk/nio/zipfs/ZipFSTester.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/jdk/jdk/nio/zipfs/ZipFSTester.java b/test/jdk/jdk/nio/zipfs/ZipFSTester.java index 6ef68ea9bed..33c521f2ac5 100644 --- a/test/jdk/jdk/nio/zipfs/ZipFSTester.java +++ b/test/jdk/jdk/nio/zipfs/ZipFSTester.java @@ -589,18 +589,21 @@ public class ZipFSTester { // test file stamp @Test void testTime() throws Exception { - var jar = Utils.createJarFile(System.currentTimeMillis() + ".jar"); + var jar = Utils.createJarFile(System.currentTimeMillis() + ".jar", + "META-INF/MANIFEST.MF", + "dir1/foo", + "dir2/bar", + "dir1/dir3/fooo"); BasicFileAttributes attrs = Files .getFileAttributeView(jar, BasicFileAttributeView.class) .readAttributes(); // create a new filesystem, copy this file into it - Map env = new HashMap(); - env.put("create", "true"); + var env = Map.of("create", "true"); Path fsPath = getTempPath(); - try (FileSystem fs = newZipFileSystem(fsPath, env)) { + try (FileSystem fs = FileSystems.newFileSystem(fsPath, env)) { System.out.println("test copy with timestamps..."); // copyin - Path dst = getPathWithParents(fs, "me"); + Path dst = fs.getPath("me"); Files.copy(jar, dst, COPY_ATTRIBUTES); checkEqual(jar, dst); System.out.println("mtime: " + attrs.lastModifiedTime());