# HG changeset patch # User sherman # Date 1370638177 25200 # Node ID 237f3c2875aa39c5e0a5b109364b0fccdb7f4914 # Parent 5997c9aedb0ec5738873ac2cea4b49503c391454 8015728: (zipfs) demo/zipfs/basic.sh failing Summary: to return the correct loc entry size from wirteLOC(); Reviewed-by: alanb diff -r 5997c9aedb0e -r 237f3c2875aa jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java --- a/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java Fri Jun 07 14:13:40 2013 -0400 +++ b/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/ZipFileSystem.java Fri Jun 07 13:49:37 2013 -0700 @@ -1940,7 +1940,6 @@ if (elen64 != 0) { elen64 += 4; // header and data sz 4 bytes } - while (eoff + 4 < elen) { int tag = SH(extra, eoff); int sz = SH(extra, eoff + 2); @@ -1995,7 +1994,6 @@ writeLong(os, locoff); } if (elenNTFS != 0) { - // System.out.println("writing NTFS:" + elenNTFS); writeShort(os, EXTID_NTFS); writeShort(os, elenNTFS - 4); writeInt(os, 0); // reserved @@ -2197,7 +2195,7 @@ if (extra != null) { writeBytes(os, extra); } - return LOCHDR + name.length + elen + elen64 + elenEXTT; + return LOCHDR + name.length + elen + elen64 + elenNTFS + elenEXTT; } // Data Descriptior diff -r 5997c9aedb0e -r 237f3c2875aa jdk/test/demo/zipfs/ZipFSTester.java --- a/jdk/test/demo/zipfs/ZipFSTester.java Fri Jun 07 14:13:40 2013 -0400 +++ b/jdk/test/demo/zipfs/ZipFSTester.java Fri Jun 07 13:49:37 2013 -0700 @@ -341,6 +341,9 @@ // test file stamp static void testTime(Path src) throws Exception { + BasicFileAttributes attrs = Files + .getFileAttributeView(src, BasicFileAttributeView.class) + .readAttributes(); // create a new filesystem, copy this file into it Map env = new HashMap(); env.put("create", "true"); @@ -352,10 +355,6 @@ Path dst = getPathWithParents(fs, "me"); Files.copy(src, dst, COPY_ATTRIBUTES); checkEqual(src, dst); - - BasicFileAttributes attrs = Files - .getFileAttributeView(src, BasicFileAttributeView.class) - .readAttributes(); System.out.println("mtime: " + attrs.lastModifiedTime()); System.out.println("ctime: " + attrs.creationTime()); System.out.println("atime: " + attrs.lastAccessTime()); diff -r 5997c9aedb0e -r 237f3c2875aa jdk/test/demo/zipfs/basic.sh --- a/jdk/test/demo/zipfs/basic.sh Fri Jun 07 14:13:40 2013 -0400 +++ b/jdk/test/demo/zipfs/basic.sh Fri Jun 07 13:49:37 2013 -0700 @@ -22,7 +22,7 @@ # # @test # @bug 6990846 7009092 7009085 7015391 7014948 7005986 7017840 7007596 -# 7157656 8002390 7012868 7012856 +# 7157656 8002390 7012868 7012856 8015728 # @summary Test ZipFileSystem demo # @build Basic PathOps ZipFSTester # @run shell basic.sh