Hi,

The regression tester pointed out another issue with gcj 4.0.x compiles
(also fixed with gcj 4.1). This fixes that by qualifying the constant as
comming from StyleConstants. And it fixes an issue in getElement() where
gcj correctly pointed out that the for loop would never actually loop
(smart gcj!).

2005-12-17  Mark Wielaard  <[EMAIL PROTECTED]>

        * javax/swing/text/html/HTMLDocument.java (BlockElementgetName):
        Qualify NameAttribute as comming from StyleConstants.
        (RunElement.getName): Likewise.
        (getElement): Check whether grandChild element is null before
        returning it.

Lillian, could you double check that getElement() change?

Thanks,

Mark
Index: javax/swing/text/html/HTMLDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/html/HTMLDocument.java,v
retrieving revision 1.18
diff -u -r1.18 HTMLDocument.java
--- javax/swing/text/html/HTMLDocument.java	18 Dec 2005 00:03:30 -0000	1.18
+++ javax/swing/text/html/HTMLDocument.java	18 Dec 2005 01:25:00 -0000
@@ -57,6 +57,7 @@
 import javax.swing.text.GapContent;
 import javax.swing.text.MutableAttributeSet;
 import javax.swing.text.SimpleAttributeSet;
+import javax.swing.text.StyleConstants;
 import javax.swing.text.html.HTML.Tag;
 
 /**
@@ -467,7 +468,7 @@
      */
     public String getName()
     {
-      return (String) getAttribute(NameAttribute); 
+      return (String) getAttribute(StyleConstants.NameAttribute); 
     }
   }
   
@@ -499,7 +500,7 @@
      */
     public String getName()
     {
-      return (String) getAttribute(NameAttribute);      
+      return (String) getAttribute(StyleConstants.NameAttribute);      
     }
     
     /**
@@ -1399,7 +1400,9 @@
             if (child.getAttributes().containsAttribute(attribute, value))
               return child;
             
-            return getElement(child, attribute, value);
+            Element grandChild = getElement(child, attribute, value);
+            if (grandChild != null)
+              return grandChild;
           }
       }
     return null;

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to