harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r420439 - 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:41:40 GMT
Author: mloenko
Date: Sun Jul  9 23:41:39 2006
New Revision: 420439

URL: http://svn.apache.org/viewvc?rev=420439&view=rev
Log:
fixes for HARMONY-736
[classlib][security]unexpected exceptions for java.security.cert.X509CRLSelector().addIssuerName(String)

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=420439&r1=420438&r2=420439&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:41:39 2006
@@ -132,6 +132,11 @@
         if (issuerNames == null) {
             issuerNames = new ArrayList<String>();
         }
+
+        if (iss_name == null) {
+            iss_name = "";
+        }
+
         String name = new Name(iss_name).getName(X500Principal.CANONICAL);
         if (!issuerNames.contains(name)) {
             issuerNames.add(name);

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=420439&r1=420438&r2=420439&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:41:39 2006
@@ -89,4 +89,19 @@
             // expected
         }
     }
+
+    /**
+     * addIssuerName(String name) method testing.
+     */
+    public void testAddIssuerName() throws IOException {
+        //Regression for HARMONY-736
+        X509CRLSelector selector = new X509CRLSelector();
+        try {
+            selector.addIssuerName("a");
+            fail("IOException expected");
+        } catch (IOException e) {}
+
+        //no exception for null
+        selector.addIssuerName((String) null);
+    }
 }



Mime
View raw message