Hi,

As pointed out in the bug report we were not handling setText("")
correctly in JEditorPane. I added a couple of Mauve tests to show this
that all PASS with this patch:

2006-03-04  Mark Wielaard  <[EMAIL PROTECTED]>

    Fixes bug #26460 reported by Beat Wolf <[EMAIL PROTECTED]>.
    * javax/swing/JEditorPane.java (setText): Check for empty String
    with equals(), not equality (==).

Committed,

Mark
Index: javax/swing/JEditorPane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JEditorPane.java,v
retrieving revision 1.31
diff -u -r1.31 JEditorPane.java
--- javax/swing/JEditorPane.java	22 Feb 2006 09:57:56 -0000	1.31
+++ javax/swing/JEditorPane.java	4 Mar 2006 09:50:03 -0000
@@ -926,7 +926,7 @@
       // Remove the current content.
       Document doc = getDocument();
       doc.remove(0, doc.getLength());
-      if (t == null || t == "")
+      if (t == null || t.equals(""))
         return;
       
       // Let the EditorKit read the text into the Document.

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

Reply via email to