harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r502190 - in /harmony/enhanced/classlib/trunk/modules/swing: META-INF/MANIFEST.MF src/main/java/common/javax/swing/text/html/ImageView.java src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java
Date Thu, 01 Feb 2007 10:54:49 GMT
Author: ayza
Date: Thu Feb  1 02:54:48 2007
New Revision: 502190

URL: http://svn.apache.org/viewvc?view=rev&rev=502190
Log:
Applying patch from HARMONY-1747 ( [classlib][swing]javax.swing.text.html.ImageView(null)
throws unspecified NullPointerException)

Added:
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java
  (with props)
Modified:
    harmony/enhanced/classlib/trunk/modules/swing/META-INF/MANIFEST.MF
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/META-INF/MANIFEST.MF?view=diff&rev=502190&r1=502189&r2=502190
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/META-INF/MANIFEST.MF (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/META-INF/MANIFEST.MF Thu Feb  1 02:54:48
2007
@@ -56,6 +56,7 @@
  javax.swing.plaf.metal,
  javax.swing.table,
  javax.swing.text,
+ javax.swing.text.html,
  javax.swing.text.html.parser,
  javax.swing.tree,
  javax.swing.undo

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java?view=diff&rev=502190&r1=502189&r2=502190
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
Thu Feb  1 02:54:48 2007
@@ -61,7 +61,9 @@
 
     public ImageView(final Element element) {
         super(element);
-        setPropertiesFromAttributes();
+        if (element != null) { // Fix for HARMONY-1747, for compatibility with RI
+            setPropertiesFromAttributes();
+        }
     }
 
     public Image getImage() {

Added: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java?view=auto&rev=502190
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java
Thu Feb  1 02:54:48 2007
@@ -0,0 +1,31 @@
+/*
+ *  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 javax.swing.text.html;
+
+import junit.framework.TestCase;
+
+public class ImageViewRTest extends TestCase {
+
+    /**
+     * Make sure no exception is thrown
+     * if constructor parameter is <code>null</code>.
+     */
+    public void testImageViewNull() {
+        // Regression test for HARMONY-1747
+        new ImageView(null);
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/html/ImageViewRTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message