Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018803 | 7u45 | Xueming Shen | P3 | Closed | Fixed | b01 |
JDK-8014841 | 7u40 | Xueming Shen | P3 | Closed | Fixed | b28 |
Description
While working with the new ZipFileSystem to modify the contents of a zip file, encountered some issues.
The issue occurs when a file within a zip file is moved to a different location within the same zip and a FileVisitor is invoked by Files.walkFileTree the original (no longer existing file) will attempted to be visited by ZipFileSystemProvider and throw a NoSuchFileException.
Attached is a standalone java file that can reproduce the issue.
Tested this on Java 7 u9 and the issue still exists.
The code creates a zip file with 5 elements in a sub directory, writes the content to disk, prints the contents of the zip file using Files.walkFileTree, moves one file from a subfolder to the root folder, then prints the contents of the zip file using Files.walkFileTree again.
The issue occurs when a file within a zip file is moved to a different location within the same zip and a FileVisitor is invoked by Files.walkFileTree the original (no longer existing file) will attempted to be visited by ZipFileSystemProvider and throw a NoSuchFileException.
Attached is a standalone java file that can reproduce the issue.
Tested this on Java 7 u9 and the issue still exists.
The code creates a zip file with 5 elements in a sub directory, writes the content to disk, prints the contents of the zip file using Files.walkFileTree, moves one file from a subfolder to the root folder, then prints the contents of the zip file using Files.walkFileTree again.
Attachments
Issue Links
- backported by
-
JDK-8014841 (zipfs) Problems moving files between zip file systems
- Closed
-
JDK-8018803 (zipfs) Problems moving files between zip file systems
- Closed