harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stepan Mishura (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2408) [classlib][security] java.security.Signer.setKeyPair(null) throws InvalidParameterException while RI throws NPE
Date Tue, 29 May 2007 02:45:17 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stepan Mishura closed HARMONY-2408.
-----------------------------------


Closing: no response from reporter - assuming OK.

> [classlib][security] java.security.Signer.setKeyPair(null) throws InvalidParameterException
while RI throws NPE
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2408
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2408
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Assignee: Stepan Mishura
>            Priority: Minor
>
> There is no mention of NPE exception in the specification.
> Harmony throws InvalidParameterException for
> java.security.Signer.setKeyPair(null) while RI throws unspecified NPE.
> Compatibility issue.
> import junit.framework.TestCase;
> import java.security.*;
> public class test extends TestCase {      
>     public void test1 () { 
>        try { 
>            SignerImpl obj = new SignerImpl();             
>            obj.setKeyPair(null);
>            fail("NullPointerException should be thrown");                
>        } catch ( KeyException e) {
>            fail("unexpected exception "+e);
>        } catch ( NullPointerException e) {
>          //expected
>        }
>     }
> }
> class SignerImpl extends java.security.Signer {
>     public SignerImpl() {
>         super();
>     }
> }
> Output on Sun 1.5:
> ==================
> .
> Time: 0
> OK (1 test)
> Output on Harmony:
> ==================
> .E
> Time: 0.015
> There was 1 error:
> 1) test1(test)java.security.InvalidParameterException
>         at java.security.Signer.setKeyPair(Signer.java:82)
>         at test.test1(test.java:8)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 0,  Errors: 1

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


Mime
View raw message