harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r483828 - in /harmony/enhanced/classlib/trunk/modules/security/src: main/java/common/java/security/cert/PolicyQualifierInfo.java test/api/java/org/apache/harmony/security/tests/java/security/cert/PolicyQualifierInfoTest.java
Date Fri, 08 Dec 2006 04:41:40 GMT
Author: smishura
Date: Thu Dec  7 20:41:39 2006
New Revision: 483828

URL: http://svn.apache.org/viewvc?view=rev&rev=483828
Log:
Fix for HARMONY-2518 ([classlib][security] java.security.cert.PolicyQualifierInfo((byte[])null
) throws IOException while RI throws NullPointerException (compatibility issue))

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

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java?view=diff&rev=483828&r1=483827&r2=483828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/cert/PolicyQualifierInfo.java
Thu Dec  7 20:41:39 2006
@@ -48,7 +48,7 @@
      */
     public PolicyQualifierInfo(byte[] encoded) throws IOException {
         if (encoded == null) {
-            throw new IOException(Messages.getString("security.0A")); //$NON-NLS-1$
+            throw new NullPointerException(Messages.getString("security.0A")); //$NON-NLS-1$
         }
         if (encoded.length == 0) {
             throw new IOException(Messages.getString("security.69")); //$NON-NLS-1$

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PolicyQualifierInfoTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PolicyQualifierInfoTest.java?view=diff&rev=483828&r1=483827&r2=483828
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PolicyQualifierInfoTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/cert/PolicyQualifierInfoTest.java
Thu Dec  7 20:41:39 2006
@@ -47,12 +47,11 @@
      * parameter does not represent a valid and parsable policy
      * qualifier info
      */
-    public final void testPolicyQualifierInfo01() {
+    public final void test_Ctor() throws IOException {
         try {
             // pass null
             new PolicyQualifierInfo(null);
-            fail("IOE or NPE expected");
-        } catch (IOException e) {
+            fail("No expected NullPointerException");
         } catch (NullPointerException e) {
         }
 



Mime
View raw message