harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
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 GMT
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<? extends Annotation> 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
+        }
+    }
+}



Mime
View raw message