Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 37603 invoked from network); 5 Dec 2006 04:29:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Dec 2006 04:29:50 -0000 Received: (qmail 61677 invoked by uid 500); 5 Dec 2006 04:29:56 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 61654 invoked by uid 500); 5 Dec 2006 04:29:56 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 61591 invoked by uid 99); 5 Dec 2006 04:29:56 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 20:29:56 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 20:29:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F08477142BF for ; Mon, 4 Dec 2006 20:29:26 -0800 (PST) Message-ID: <4815074.1165292966982.JavaMail.jira@brutus> Date: Mon, 4 Dec 2006 20:29:26 -0800 (PST) From: "Stepan Mishura (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-2408) [classlib][security] java.security.Signer.setKeyPair(null) throws InvalidParameterException while RI throws NPE In-Reply-To: <2134628.1165232781050.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/HARMONY-2408?page=all ] Stepan Mishura reassigned HARMONY-2408: --------------------------------------- Assignee: Stepan Mishura > [classlib][security] java.security.Signer.setKeyPair(null) throws InvalidParameterException while RI throws NPE > --------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-2408 > URL: http://issues.apache.org/jira/browse/HARMONY-2408 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Artem Aliev > Assigned To: 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. - 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