diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | javax/swing/JEditorPane.java | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2006-03-04 Mark Wielaard <mark@klomp.org> + Fixes bug #26460 reported by Beat Wolf <asraniel@fryx.ch>. + * javax/swing/JEditorPane.java (setText): Check for empty String + with equals(), not equality (==). + +2006-03-04 Mark Wielaard <mark@klomp.org> + * javax/swing/text/html/HTMLDocument.java: Qualify ElementSpec as DefaultStyledDocument.ElementSpec for gcj 4.0.x. diff --git a/javax/swing/JEditorPane.java b/javax/swing/JEditorPane.java index 9264c8dd8..73b775738 100644 --- a/javax/swing/JEditorPane.java +++ b/javax/swing/JEditorPane.java @@ -926,7 +926,7 @@ public class JEditorPane extends JTextComponent // 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. |