harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r429540 - in /incubator/harmony/enhanced/classlib/trunk/modules/security/src: main/java/common/org/apache/harmony/security/x501/ test/api/java/org/apache/harmony/security/tests/java/security/cert/
Date Tue, 08 Aug 2006 02:16:54 GMT
Author: smishura
Date: Mon Aug  7 19:16:53 2006
New Revision: 429540

URL: http://svn.apache.org/viewvc?rev=429540&view=rev
Log:
Fix for HARMONY-1076 ([classlib][security] unexpected IllegalArgumentException for java.security.cert.X509CRLSelector().addIssuerName("w=y"))

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.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/org/apache/harmony/security/x501/AttributeTypeAndValue.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java?rev=429540&r1=429539&r2=429540&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/org/apache/harmony/security/x501/AttributeTypeAndValue.java
Mon Aug  7 19:16:53 2006
@@ -268,7 +268,8 @@
      * @throws IOException
      *             if OID can not be created from its string representation
      */
-    public AttributeTypeAndValue(String sOid, AttributeValue value) {
+    public AttributeTypeAndValue(String sOid, AttributeValue value)
+            throws IOException {
         if (sOid.charAt(0) >= '0' && sOid.charAt(0) <= '9') {
 
             int[] array = org.apache.harmony.security.asn1.ObjectIdentifier
@@ -283,8 +284,7 @@
         } else {
             this.oid = (ObjectIdentifier) KNOWN_NAMES.get(sOid.toUpperCase());
             if (this.oid == null) {
-                throw new IllegalArgumentException(
-                        "Unrecognizable attribute name: " + sOid);
+                throw new IOException("Unrecognizable attribute name: " + sOid);
             }
         }
         this.value = value;

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=429540&r1=429539&r2=429540&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
Mon Aug  7 19:16:53 2006
@@ -62,6 +62,14 @@
         } catch (IOException e) {
             // expected
         }
+
+        // Regression for HARMONY-1076
+        try {
+            new X509CRLSelector().addIssuerName("w=y");
+            fail("IOException expected");
+        } catch (IOException e) {
+            // expected
+        }
     }
 
     /**



Mime
View raw message