harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lian...@apache.org
Subject svn commit: r518045 - in /harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar: JarInputStream.java JarVerifier.java
Date Wed, 14 Mar 2007 07:32:34 GMT
Author: liangyx
Date: Wed Mar 14 00:32:33 2007
New Revision: 518045

URL: http://svn.apache.org/viewvc?view=rev&rev=518045
Log:
Apply patch for HARMONY-3386([classlib][archive]adopt toASCIIUpper(Lower)Case in JarVerifier
and JarInputStream)

Modified:
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarInputStream.java
    harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarVerifier.java

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarInputStream.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarInputStream.java?view=diff&rev=518045&r1=518044&r2=518045
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarInputStream.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarInputStream.java
Wed Mar 14 00:32:33 2007
@@ -24,6 +24,8 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
+import org.apache.harmony.archive.util.Util;
+
 public class JarInputStream extends ZipInputStream {
 
     private Manifest manifest;
@@ -52,7 +54,7 @@
         if ((mEntry = getNextJarEntry()) == null) {
             return;
         }
-        String name = mEntry.getName().toUpperCase();
+        String name = Util.toASCIIUpperCase(mEntry.getName());
         if (name.equals(JarFile.META_DIR)) {
             mEntry = null; // modifies behavior of getNextJarEntry()
             closeEntry();
@@ -162,7 +164,7 @@
                 return null;
             }
             if (verifier != null) {
-                isMeta = jarEntry.getName().toUpperCase().startsWith(
+                isMeta = Util.toASCIIUpperCase(jarEntry.getName()).startsWith(
                         JarFile.META_DIR);
                 if (isMeta) {
                     verStream = new ByteArrayOutputStream();

Modified: harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarVerifier.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarVerifier.java?view=diff&rev=518045&r1=518044&r2=518045
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarVerifier.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarVerifier.java
Wed Mar 14 00:32:33 2007
@@ -37,6 +37,8 @@
 import org.apache.harmony.luni.util.Base64;
 import org.apache.harmony.security.utils.JarUtils;
 
+import org.apache.harmony.archive.util.Util;
+
 /**
  * Non-public class used by {@link JarFile} and
  * {@link JarInputStream} to manage the verification of signed
@@ -215,7 +217,7 @@
      * @see #removeMetaEntries()
      */
     void addMetaEntry(String name, byte[] buf) {
-        metaEntries.put(name.toUpperCase(), buf);
+        metaEntries.put(Util.toASCIIUpperCase(name), buf);
     }
 
     /**



Mime
View raw message