提交 ae323e84 编写于 作者: S sherman

8186227: jdk/nio/zipfs/ZeroDate.java fails on Windows with...

8186227: jdk/nio/zipfs/ZeroDate.java fails on Windows with "IllegalArgumentException: Illegal character in opaque part at index 13"
Reviewed-by: rriggs
上级 0faccd45
......@@ -44,7 +44,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/* @test
* @bug 8184940
* @bug 8184940 8186227
* @summary JDK 9 rejects zip files where the modified day or month is 0
* @author Liam Miller-Cushon
*/
......@@ -85,7 +85,7 @@ public class ZeroDate {
try (OutputStream os = Files.newOutputStream(path)) {
os.write(data);
}
URI uri = URI.create("jar:file://" + path.toAbsolutePath());
URI uri = URI.create("jar:" + path.toUri());
try (FileSystem fs = FileSystems.newFileSystem(uri, Collections.emptyMap())) {
Path entry = fs.getPath("x");
Instant actualInstant =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册