1 Star 0 Fork 81

zhaosai/openjdk-1.8.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
add-8226530-test-case-fixed.patch 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
DXwangg 提交于 2023-09-26 09:10 . Add feature and bug fix for 8u382
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaosai-Simon/openjdk-1.8.0.git
git@gitee.com:zhaosai-Simon/openjdk-1.8.0.git
zhaosai-Simon
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助