harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r422927 - in /incubator/harmony/enhanced/classlib/trunk/modules/archive/src: main/java/java/util/jar/JarEntry.java test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java
Date Tue, 18 Jul 2006 00:21:44 GMT
Author: ndbeyer
Date: Mon Jul 17 17:21:43 2006
New Revision: 422927

URL: http://svn.apache.org/viewvc?rev=422927&view=rev
Log:
Apply patch for HARMONY-899: JarEntry.getSodeSigners() throws NPE if certificates are null

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java?rev=422927&r1=422926&r2=422927&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/main/java/java/util/jar/JarEntry.java
Mon Jul 17 17:21:43 2006
@@ -134,6 +134,9 @@
     }
 
     private CodeSigner[] getCodeSigners(Certificate[] certs) {
+        if(null == certs) {
+            return null;
+        }
 
         X500Principal prevIssuer = null;
         ArrayList<Certificate> list = new ArrayList<Certificate>(certs.length);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java?rev=422927&r1=422926&r2=422927&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarEntryTest.java
Mon Jul 17 17:21:43 2006
@@ -137,6 +137,9 @@
 	    }
 	    assertEquals(2,certs_bob.size());
 	    assertEquals(1,certs_alice.size());
+            
+            assertNull("getCodeSigners() of a primitive JarEntry should return null", 
+                 new JarEntry("aaa").getCodeSigners());
 	}    
     
 	/**



Mime
View raw message