Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 13181 invoked from network); 20 Jun 2006 11:12:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Jun 2006 11:12:58 -0000 Received: (qmail 12605 invoked by uid 500); 20 Jun 2006 11:12:54 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 12550 invoked by uid 500); 20 Jun 2006 11:12:54 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 12505 invoked by uid 99); 20 Jun 2006 11:12:54 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 04:12:54 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Jun 2006 04:12:53 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1A744410007 for ; Tue, 20 Jun 2006 11:11:31 +0000 (GMT) Message-ID: <10254990.1150801891105.JavaMail.jira@brutus> Date: Tue, 20 Jun 2006 11:11:31 +0000 (GMT+00:00) From: "Alexander Kleymenov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Updated: (HARMONY-465) [classlib][security] Harmony should follow the "Exception-throwing compatibility" guidelines. In-Reply-To: <12128213.1147765627574.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-465?page=all ] Alexander Kleymenov updated HARMONY-465: ---------------------------------------- Attachment: exception.patch.txt Strange things... I am reattaching the patch with another name. Thank You very much! > [classlib][security] Harmony should follow the "Exception-throwing compatibility" guidelines. > --------------------------------------------------------------------------------------------- > > Key: HARMONY-465 > URL: http://issues.apache.org/jira/browse/HARMONY-465 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: Dmitry M. Kononov > Assignee: Mikhail Loenko > Priority: Minor > Attachments: Test.java, exception.patch.txt, exception_patch.txt, fix.diff.txt > > 1) > java.security.cert.X509CertSelector.setSubjectPublicKeyAlgID(String oid): > Harmony throws java.lang.StringIndexOutOfBoundsException when oid is invalid, > while RI throws java.lang.NumberFormatException. > Specification says: > "Throws: > IOException - if the OID is invalid, such as the first component > being not 0, 1 or 2 or the second component being greater than 39". > It's a bug as we should comply with spec. > 2) > java.security.cert.X509CRLSelector.addIssuer(X500Principal issuer): > Harmony does not throw any Exception when issuer =null, while RI throws NullPointerException. > Specification does not mention NullPointerException throwing. > It's a bug as we should comply with RI if spec is not clear. > 3) > java.security.cert.X509CRLSelector.addIssuerName(byte[] name): > Harmony throws java.lang.IllegalArgumentException when name is not valid name in ASN.1 > DER encoded form, while RI throws java.io.IOException. > Specification does not mention java.lang.IllegalArgumentException throwing, but says: > "Throws: > IOException - if a parsing error occurs". > It's a bug as we should comply with spec like RI does. > 4) > java.security.cert.X509CRLSelector.addIssuerName(byte[] name): > Harmony throws IllegalArgumentException when name=null, while RI throws NullPointerException. > Specification mentions neither IllegalArgumentException nor NullPointerException throwing. > It's a bug as we should comply with RI if spec is not clear. -- 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