55 lines
2.1 KiB
Diff
55 lines
2.1 KiB
Diff
From 6430afa36959aa740f47d64427f06c755ea1549f Mon Sep 17 00:00:00 2001
|
|
Date: Thu, 21 Sep 2023 15:25:27 +0800
|
|
Subject: add 8226530-test-case-fixed
|
|
|
|
---
|
|
jdk/test/java/util/zip/ZipFile/Zip64SizeTest.java | 13 +++++++------
|
|
1 file changed, 7 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/jdk/test/java/util/zip/ZipFile/Zip64SizeTest.java b/jdk/test/java/util/zip/ZipFile/Zip64SizeTest.java
|
|
index be701e480..c466ffa07 100644
|
|
--- a/jdk/test/java/util/zip/ZipFile/Zip64SizeTest.java
|
|
+++ b/jdk/test/java/util/zip/ZipFile/Zip64SizeTest.java
|
|
@@ -26,7 +26,8 @@ import org.testng.annotations.Test;
|
|
|
|
import java.io.*;
|
|
import java.nio.file.Files;
|
|
-import java.nio.file.Path;
|
|
+import java.nio.file.Paths;
|
|
+import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.zip.ZipEntry;
|
|
import java.util.zip.ZipFile;
|
|
@@ -52,7 +53,7 @@ public class Zip64SizeTest {
|
|
// File that will be created with a size less than 0xFFFFFFFF
|
|
private static final String SMALL_FILE_NAME = "SmallZipEntry.txt";
|
|
// List of files to be added to the ZIP file
|
|
- private static final List<String> ZIP_ENTRIES = List.of(LARGE_FILE_NAME,
|
|
+ private static final List<String> ZIP_ENTRIES = Arrays.asList(LARGE_FILE_NAME,
|
|
SMALL_FILE_NAME);
|
|
private static final long LARGE_FILE_SIZE = 5L * 1024L * 1024L * 1024L; // 5GB
|
|
private static final long SMALL_FILE_SIZE = 0x100000L; // 1024L x 1024L;
|
|
@@ -83,9 +84,9 @@ public class Zip64SizeTest {
|
|
* @throws IOException if an error occurs deleting the files
|
|
*/
|
|
private static void deleteFiles() throws IOException {
|
|
- Files.deleteIfExists(Path.of(ZIP_FILE_NAME));
|
|
- Files.deleteIfExists(Path.of(LARGE_FILE_NAME));
|
|
- Files.deleteIfExists(Path.of(SMALL_FILE_NAME));
|
|
+ Files.deleteIfExists(Paths.get(ZIP_FILE_NAME));
|
|
+ Files.deleteIfExists(Paths.get(LARGE_FILE_NAME));
|
|
+ Files.deleteIfExists(Paths.get(SMALL_FILE_NAME));
|
|
}
|
|
|
|
/**
|
|
@@ -144,4 +145,4 @@ public class Zip64SizeTest {
|
|
public void tearDown() throws IOException {
|
|
deleteFiles();
|
|
}
|
|
-}
|
|
\ No newline at end of file
|
|
+}
|
|
--
|
|
2.22.0
|
|
|