Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 32763 invoked from network); 24 Dec 2006 03:51:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Dec 2006 03:51:44 -0000 Received: (qmail 69216 invoked by uid 500); 24 Dec 2006 03:51:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 69195 invoked by uid 500); 24 Dec 2006 03:51:51 -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 69184 invoked by uid 99); 24 Dec 2006 03:51:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Dec 2006 19:51:51 -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; Sat, 23 Dec 2006 19:51:43 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 298017140D2 for ; Sat, 23 Dec 2006 19:51:23 -0800 (PST) Message-ID: <14825932.1166932283167.JavaMail.jira@brutus> Date: Sat, 23 Dec 2006 19:51:23 -0800 (PST) From: "Vasily Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2477) [classlib][annotation] java.lang.annotation.IncompleteAnnotationException(null,String ) does not throw NullPointerException (RI compatibility issue) In-Reply-To: <31799419.1165339702387.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-2477?page=all ] Vasily Zakharov updated HARMONY-2477: ------------------------------------- Attachment: Harmony-2477-Test.patch Attached test patch. Had to create the test classes structure for Annotation module. This patch has one problem - the single test contained there is in fact run 3 times, I'm not sure why. > [classlib][annotation] java.lang.annotation.IncompleteAnnotationException(null,String ) does not throw NullPointerException (RI compatibility issue) > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-2477 > URL: http://issues.apache.org/jira/browse/HARMONY-2477 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Anton Ivanov > Priority: Trivial > Attachments: Harmony-2477-Test.patch, Harmony-2477.patch > > > java.lang.IncompleteAnnotationException(Class annotationType,String elementName) does not throw > NullPointerException if annotationType == null while RI throws. But there is no mention of any exceptions in the specificarion. > So this is a compatibility issue. > The code to reproduce the issue: > import junit.framework.TestCase; > import java.lang.annotation.IncompleteAnnotationException; > public class TestIncompleteAnnotationException extends TestCase { > public void test1 () { > try { > IncompleteAnnotationException obj > = new IncompleteAnnotationException(null, "str"); > fail("NullPointerException must be thrown"); > } catch (NullPointerException e) { > //expected > } > } > } -- 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