harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r883524 - in /harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar: JarFile.java Manifest.java
Date Mon, 23 Nov 2009 22:22:06 GMT
Author: tellison
Date: Mon Nov 23 22:22:05 2009
New Revision: 883524

URL: http://svn.apache.org/viewvc?rev=883524&view=rev
Log:
Revert r823479 to fix HARMONY-6381 ([classlib][rmi] Regression in test RMIClassLoaderTest.testLoadClassCodebaseOrder)

Modified:
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java?rev=883524&r1=883523&r2=883524&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarFile.java
Mon Nov 23 22:22:05 2009
@@ -339,11 +339,15 @@
         }
         try {
             InputStream is = super.getInputStream(manifestEntry);
-            byte[] buffer = getAllBytesFromStreamAndClose(is);
             if (verifier != null) {
-                verifier.addMetaEntry(manifestEntry.getName(), buffer);
+                verifier.addMetaEntry(manifestEntry.getName(), getAllBytesFromStreamAndClose(is));
+                is = super.getInputStream(manifestEntry);
+            }
+            try {
+                manifest = new Manifest(is, verifier != null);
+            } finally {
+                is.close();
             }
-            manifest = new Manifest(buffer, verifier != null);
             manifestEntry = null;  // Can discard the entry now.
         } catch (NullPointerException e) {
             manifestEntry = null;

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java?rev=883524&r1=883523&r2=883524&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/Manifest.java
Mon Nov 23 22:22:05 2009
@@ -115,13 +115,6 @@
         }
         read(is);
     }
-    
-    Manifest(byte[] buf, boolean readChunks) throws IOException {
-        if (readChunks) {
-            chunks = new HashMap<String, Chunk>();
-        }
-        initFromBytes(buf);
-    }
 
     /**
      * Resets the both the main attributes as well as the entry attributes
@@ -233,13 +226,6 @@
             buf[buf.length - 1] = '\n';
         }
 
-        initFromBytes(buf);
-    }
-
-    void initFromBytes(byte[] buf) throws IOException {
-        if (buf.length == 0) {
-            return;
-        }
         // Attributes.Name.MANIFEST_VERSION is not used for
         // the second parameter for RI compatibility
         im = new InitManifest(buf, mainAttributes, null);



Mime
View raw message