harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r420440 - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src: main/java/common/java/security/cert/X509CRLSelector.java test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.java
Date Mon, 10 Jul 2006 06:52:11 GMT
Author: mloenko
Date: Sun Jul  9 23:52:10 2006
New Revision: 420440

URL: http://svn.apache.org/viewvc?rev=420440&view=rev
Log:
fixes for HARMONY-737
[classlib][security] unexpected NPE for java.security.cert.X509CRLSelector.setIssuerNames(user_defined_collection);

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java?rev=420440&r1=420439&r2=420440&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/X509CRLSelector.java
Sun Jul  9 23:52:10 2006
@@ -83,6 +83,9 @@
             issuerPrincipals = null;
             return;
         }
+        if (names.size() == 0) {
+            return;
+        }
         issuerNames = new ArrayList<String>(names.size());
         for (Object name: names) {
             if (name instanceof String) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.java?rev=420440&r1=420439&r2=420440&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/X509CRLSelectorTest.java
Sun Jul  9 23:52:10 2006
@@ -23,6 +23,8 @@
 
 import java.io.IOException;
 import java.security.cert.X509CRLSelector;
+import java.util.Iterator;
+import java.util.TreeSet;
 
 import javax.security.auth.x500.X500Principal;
 
@@ -91,7 +93,7 @@
     }
 
     /**
-     * addIssuerName(String name) method testing.
+     * @tests addIssuerName(String name)
      */
     public void testAddIssuerName() throws IOException {
         //Regression for HARMONY-736
@@ -103,5 +105,18 @@
 
         //no exception for null
         selector.addIssuerName((String) null);
+    }
+
+    /**
+     * @tests setIssuerNames(Collection <?> names)
+     */
+    public void testSetIssuerNames1() throws IOException {
+        // Regression for HARMONY-737
+        X509CRLSelector selector = new X509CRLSelector();
+        selector.setIssuerNames(new TreeSet() {
+            public Iterator iterator() {
+                return null;
+            }
+        });
     }
 }



Mime
View raw message