You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Anton Ivanov (JIRA)" <ji...@apache.org> on 2006/12/06 11:25:21 UTC

[jira] Created: (HARMONY-2487) java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)

java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)
---------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2487
                 URL: http://issues.apache.org/jira/browse/HARMONY-2487
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Anton Ivanov
            Priority: Trivial


IOException is thrown for java.security.cert.X509CertSelector.addSubjectAlternativeName(int type, byte[] name) when name is null while RI throws NullPointerException.
There is no mention in specification what exception should be thrown when parameter name is null.
It's a compatibility issue.
The same problem is with java.security.cert.X509CertSelector.addPathToName(int type, byte[] name).

Test to reproduce the problem:

import junit.framework.TestCase;
import java.security.cert.X509CertSelector; 
import java.io.IOException; 

public class X509CertSelectorTest extends TestCase {
        
    public void test1() { 
        int type = 0;
        X509CertSelector sl = new X509CertSelector();
        
        try {
            sl.addSubjectAlternativeName(type,(byte[])null); 
        } catch (NullPointerException e) {
            //passed
        } catch (Exception e) {
            fail("NullPointerException should be thrown");
        }
    }

    public void test2() { 
        int type = 0;
        X509CertSelector sl = new X509CertSelector();
        
        try {
            sl.addPathToName(type,(byte[])null); 
        } catch (NullPointerException e) {
            //passed
        } catch (Exception e) {
            fail("NullPointerException should be thrown");
        }
    }
} 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (HARMONY-2487) [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2487?page=all ]

Stepan Mishura updated HARMONY-2487:
------------------------------------

    Summary: [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)  (was: java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue))

> [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2487
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2487
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Ivanov
>         Assigned To: Stepan Mishura
>            Priority: Trivial
>
> IOException is thrown for java.security.cert.X509CertSelector.addSubjectAlternativeName(int type, byte[] name) when name is null while RI throws NullPointerException.
> There is no mention in specification what exception should be thrown when parameter name is null.
> It's a compatibility issue.
> The same problem is with java.security.cert.X509CertSelector.addPathToName(int type, byte[] name).
> Test to reproduce the problem:
> import junit.framework.TestCase;
> import java.security.cert.X509CertSelector; 
> import java.io.IOException; 
> public class X509CertSelectorTest extends TestCase {
>         
>     public void test1() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addSubjectAlternativeName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
>     public void test2() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addPathToName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
> } 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (HARMONY-2487) [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stepan Mishura closed HARMONY-2487.
-----------------------------------


Closing: no response from reporter - assuming OK.

> [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2487
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2487
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Ivanov
>            Assignee: Stepan Mishura
>            Priority: Trivial
>
> IOException is thrown for java.security.cert.X509CertSelector.addSubjectAlternativeName(int type, byte[] name) when name is null while RI throws NullPointerException.
> There is no mention in specification what exception should be thrown when parameter name is null.
> It's a compatibility issue.
> The same problem is with java.security.cert.X509CertSelector.addPathToName(int type, byte[] name).
> Test to reproduce the problem:
> import junit.framework.TestCase;
> import java.security.cert.X509CertSelector; 
> import java.io.IOException; 
> public class X509CertSelectorTest extends TestCase {
>         
>     public void test1() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addSubjectAlternativeName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
>     public void test2() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addPathToName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
> } 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-2487) [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2487?page=all ]

Stepan Mishura resolved HARMONY-2487.
-------------------------------------

    Resolution: Fixed

Thanks Anton - the bug was fixed in SECURITY module at r483841.

Please check that the fix fully resolves your problem.

> [classlib][security] java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)
> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2487
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2487
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Ivanov
>         Assigned To: Stepan Mishura
>            Priority: Trivial
>
> IOException is thrown for java.security.cert.X509CertSelector.addSubjectAlternativeName(int type, byte[] name) when name is null while RI throws NullPointerException.
> There is no mention in specification what exception should be thrown when parameter name is null.
> It's a compatibility issue.
> The same problem is with java.security.cert.X509CertSelector.addPathToName(int type, byte[] name).
> Test to reproduce the problem:
> import junit.framework.TestCase;
> import java.security.cert.X509CertSelector; 
> import java.io.IOException; 
> public class X509CertSelectorTest extends TestCase {
>         
>     public void test1() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addSubjectAlternativeName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
>     public void test2() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addPathToName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
> } 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (HARMONY-2487) java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)

Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2487?page=all ]

Stepan Mishura reassigned HARMONY-2487:
---------------------------------------

    Assignee: Stepan Mishura

> java.security.cert.X509CertSelector.addSubjectAlternativeName(int, null) throws IOException while RI throws NullPointerException (RI compatibility issue)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2487
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2487
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Anton Ivanov
>         Assigned To: Stepan Mishura
>            Priority: Trivial
>
> IOException is thrown for java.security.cert.X509CertSelector.addSubjectAlternativeName(int type, byte[] name) when name is null while RI throws NullPointerException.
> There is no mention in specification what exception should be thrown when parameter name is null.
> It's a compatibility issue.
> The same problem is with java.security.cert.X509CertSelector.addPathToName(int type, byte[] name).
> Test to reproduce the problem:
> import junit.framework.TestCase;
> import java.security.cert.X509CertSelector; 
> import java.io.IOException; 
> public class X509CertSelectorTest extends TestCase {
>         
>     public void test1() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addSubjectAlternativeName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
>     public void test2() { 
>         int type = 0;
>         X509CertSelector sl = new X509CertSelector();
>         
>         try {
>             sl.addPathToName(type,(byte[])null); 
>         } catch (NullPointerException e) {
>             //passed
>         } catch (Exception e) {
>             fail("NullPointerException should be thrown");
>         }
>     }
> } 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira