This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git
The following commit(s) were added to refs/heads/master by this push:
new 5c2649e8 Port some test code from IO to NIO APIs
5c2649e8 is described below
commit 5c2649e881799f1b6861fdc1ad3a97324d73e63f
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jan 28 09:55:40 2023 -0500
Port some test code from IO to NIO APIs
---
.../test/java/org/apache/commons/vfs2/provider/zip/FileLockTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/FileLockTest.java
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/FileLockTest.java
index a01f8d73..b6dace0e 100644
---
a/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/FileLockTest.java
+++
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/FileLockTest.java
@@ -27,6 +27,7 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.SystemUtils;
@@ -83,7 +84,7 @@ public class FileLockTest {
final Path zipFile =
Paths.get("src/test/resources/test-data/test.zip");
newZipFile = Files.createTempFile(getClass().getSimpleName(), ".zip");
newZipFile.toFile().deleteOnExit();
- Files.copy(zipFile, newZipFile);
+ Files.copy(zipFile, newZipFile, StandardCopyOption.REPLACE_EXISTING);
zipFileUri = "zip:file:" + newZipFile.toAbsolutePath() +
"!/read-tests/file1.txt";
manager = VFS.getManager();
}