Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 52865 invoked from network); 11 Jan 2007 17:21:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jan 2007 17:21:03 -0000 Received: (qmail 16653 invoked by uid 500); 11 Jan 2007 17:21:09 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 16633 invoked by uid 500); 11 Jan 2007 17:21:09 -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 16624 invoked by uid 99); 11 Jan 2007 17:21:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 09:21:09 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 09:21:02 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 48CD91A981A; Thu, 11 Jan 2007 09:20:01 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r495297 - in /harmony/enhanced/classlib/trunk/modules/annotation/src: main/java/java/lang/annotation/ test/java/org/ test/java/org/apache/ test/java/org/apache/harmony/ test/java/org/apache/harmony/annotation/ test/java/org/apache/harmony/a... Date: Thu, 11 Jan 2007 17:20:01 -0000 To: commits@harmony.apache.org From: ayza@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070111172001.48CD91A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ayza Date: Thu Jan 11 09:20:00 2007 New Revision: 495297 URL: http://svn.apache.org/viewvc?view=rev&rev=495297 Log: Applying patch for HARMONY-2477 ([classlib][annotation] java.lang.annotation.IncompleteAnnotationException(null,String ) does not throw NullPointerException) Added: harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/IncompleteAnnotationExceptionTest.java Modified: harmony/enhanced/classlib/trunk/modules/annotation/src/main/java/java/lang/annotation/IncompleteAnnotationException.java Modified: harmony/enhanced/classlib/trunk/modules/annotation/src/main/java/java/lang/annotation/IncompleteAnnotationException.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/annotation/src/main/java/java/lang/annotation/IncompleteAnnotationException.java?view=diff&rev=495297&r1=495296&r2=495297 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/annotation/src/main/java/java/lang/annotation/IncompleteAnnotationException.java (original) +++ harmony/enhanced/classlib/trunk/modules/annotation/src/main/java/java/lang/annotation/IncompleteAnnotationException.java Thu Jan 11 09:20:00 2007 @@ -47,7 +47,7 @@ */ public IncompleteAnnotationException( Class annotationType, String elementName) { - super(Messages.getString("annotation.0", elementName, annotationType)); //$NON-NLS-1$ + super(Messages.getString("annotation.0", elementName, annotationType.getName())); //$NON-NLS-1$ this.annotationType = annotationType; this.elementName = elementName; } Added: harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/IncompleteAnnotationExceptionTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/IncompleteAnnotationExceptionTest.java?view=auto&rev=495297 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/IncompleteAnnotationExceptionTest.java (added) +++ harmony/enhanced/classlib/trunk/modules/annotation/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/IncompleteAnnotationExceptionTest.java Thu Jan 11 09:20:00 2007 @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.harmony.annotation.tests.java.lang.annotation; + +import java.lang.annotation.IncompleteAnnotationException; + +import junit.framework.TestCase; + +/** + * + */ +public class IncompleteAnnotationExceptionTest extends TestCase { + + /* + * Class under test for void IncompleteAnnotationException(String) + * Regression for HARMONY-2477 + */ + public void testNullType() { + try { + new IncompleteAnnotationException(null, "str"); + fail("NullPointerException must be thrown"); + } catch (NullPointerException e) { + // Expected + } + } +}