Hi Goetz,

> Patching the file myself really helped to see there are no real changes.
> 
> For the missing patch of the constructor I understand it was only an arbitrary
> reordering of arguments you omitted. Thus the whole chunk disappeared.
> This makes sense, and in case someone downports the other change he
> should be able to cope with that.

Well, there were actually 3 failing hunks:

--- ZipFileSystem.java
+++ ZipFileSystem.java
@@ -316,8 +326,8 @@
                 IndexNode inode = getInode(path);
                 if (inode == null)
                     return null;
-                e = new Entry(inode.name, inode.isdir);  // pseudo directory
-                e.method = METHOD_STORED;                // STORED for dir
+                // pseudo directory, uses METHOD_STORED
+                e = new Entry(inode.name, inode.isdir, METHOD_STORED);
                 e.mtime = e.atime = e.ctime = zfsDefaultTimeStamp;
             }
         } finally {

This one just had to find its place -> it is included in my change (line 329 of 
new file).

@@ -1087,8 +1061,9 @@
             if (pos + CENHDR + nlen > limit) {
                 zerror("invalid CEN header (bad header size)");
             }
-            IndexNode inode = new IndexNode(cen, nlen, pos);
+            IndexNode inode = new IndexNode(cen, pos, nlen);
             inodes.put(inode, inode);
+
             // skip ext and comment
             pos += (CENHDR + nlen + elen + clen);
         }

This one was the reordering of arguments when calling the "IndexNode" 
constructor itself.

@@ -1806,7 +1777,7 @@
         }
 
         // constructor for cenInit() (1) remove tailing '/' (2) pad leading '/'
-        IndexNode(byte[] cen, int nlen, int pos) {
+        IndexNode(byte[] cen, int pos, int nlen) {
             int noff = pos + CENHDR;
             if (cen[noff + nlen - 1] == '/') {
                 isdir = true;

This one was the reordering of arguments of the "IndexNode" constructor itself.

I think it's better to also take over the reordering of arguments of the 
constructor. Here's an updated webrev: 
http://cr.openjdk.java.net/~clanger/webrevs/8034802.11u.1/

The updates are in line 1054 and 1770 of the new ZipFileSystem.java.

Best regards
Christoh

Reply via email to