harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-724) [classlib][security] unexpected exception for java.security.X509CertSelector.addPathToName (<1,2,4,7,8>, (String) null)
Date Mon, 10 Jul 2006 07:54:30 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-724?page=all ]

Mikhail Loenko reassigned HARMONY-724:
--------------------------------------

    Assign To: Mikhail Loenko

> [classlib][security] unexpected exception for  java.security.X509CertSelector.addPathToName
(<1,2,4,7,8>, (String) null)
> ------------------------------------------------------------------------------------------------------------------------
>
>          Key: HARMONY-724
>          URL: http://issues.apache.org/jira/browse/HARMONY-724
>      Project: Harmony
>         Type: Bug

>     Reporter: Vladimir Ivanov
>     Assignee: Mikhail Loenko
>  Attachments: X509CertSelectorTest.patch
>
> According to 1.5 spec java.security.X509CertSelector.addPathToName method must throw
IOException - if a parsing error occurs. 
> Harmony if second parameter == null throws 
> 1) NPE if type = 4 or 7
> 2) IllegalArgumentException if type = 8
> 3) correct IOException if type =0,3,5,6
> 4) does not throw any exception if type=1,2
> while RI throws IOException.
> ====================== test.java ==========================
> import java.security.cert.X509CertSelector;
> import java.io.IOException;
> public class test  {
>     public static void main (String[] args) { 
>         for (int type = 0; type <=8; type++) {
>             try {
>                 new X509CertSelector().addPathToName(type, (String) null);          
                                                              
>             } catch (IOException e) {
>                 System.out.println("[" + type + "] -> passed: " + e);
>             } catch (Exception e) {
>                 System.out.println("[" + type + "] -> failed: " + e);
>             }
>         }
>     } 
> }
> =======================================================
> Output:
> C:\tmp\tmp17>C:\jrockit-jdk1.5.0-windows-ia32\bin\java.exe -showversion test
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System
optimized over throughput (initial strategy singleparpar))
> [0] -> passed: java.io.IOException: name not String or byte array
> [1] -> passed: java.io.IOException: name not String or byte array
> [2] -> passed: java.io.IOException: name not String or byte array
> [3] -> passed: java.io.IOException: name not String or byte array
> [4] -> passed: java.io.IOException: name not String or byte array
> [5] -> passed: java.io.IOException: name not String or byte array
> [6] -> passed: java.io.IOException: name not String or byte array
> [7] -> passed: java.io.IOException: name not String or byte array
> [8] -> passed: java.io.IOException: name not String or byte array
> C:\tmp\tmp17>C:\harmony\trunk_0427\deploy\jdk\jre\bin\java.exe -showversion test
> java version 1.5 (subset)
> (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> [0] -> passed: java.io.IOException: Unknown string representation for type [0]
> [3] -> passed: java.io.IOException: Unknown string representation for type [3]
> [4] -> failed: java.lang.NullPointerException
> [5] -> passed: java.io.IOException: Unknown string representation for type [5]
> [7] -> failed: java.lang.NullPointerException
> [8] -> failed: java.lang.IllegalArgumentException: ObjectIdentifier string is null

-- 
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


Mime
View raw message