harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r669414 - in /harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar: InitManifest.java Manifest.java
Date Thu, 19 Jun 2008 07:59:48 GMT
Author: tellison
Date: Thu Jun 19 00:59:48 2008
New Revision: 669414

URL: http://svn.apache.org/viewvc?rev=669414&view=rev
Log:
Apply patch HARMONY-5778 ([classlib][archive] RI compatibility: Attributes.Name.MANIFEST_VERSION
is not mandatory)

Modified:
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.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/InitManifest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java?rev=669414&r1=669413&r2=669414&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/InitManifest.java
Thu Jun 19 00:59:48 2008
@@ -46,7 +46,7 @@
         this.buf = buf;
 
         // check a version attribute
-        if (!readHeader() || !name.equals(ver)) {
+        if (!readHeader() || (ver != null && !name.equals(ver))) {
             throw new IOException(Messages.getString(
                     "archive.2D", ver)); //$NON-NLS-1$
         }

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=669414&r1=669413&r2=669414&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
Thu Jun 19 00:59:48 2008
@@ -218,8 +218,9 @@
             buf[buf.length - 1] = '\n';
         }
 
-        im = new InitManifest(buf, mainAttributes,
-                Attributes.Name.MANIFEST_VERSION);
+        // Attributes.Name.MANIFEST_VERSION is not used for
+        // the second parameter for RI compatibility
+        im = new InitManifest(buf, mainAttributes, null);
         mainEnd = im.getPos();
         // FIXME
         im.initEntries(entries, chunks);



Mime
View raw message