Index: javax/swing/text/DefaultStyledDocument.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/text/DefaultStyledDocument.java,v retrieving revision 1.10 diff -u -r1.10 DefaultStyledDocument.java --- javax/swing/text/DefaultStyledDocument.java 14 Sep 2005 21:26:06 -0000 1.10 +++ javax/swing/text/DefaultStyledDocument.java 14 Sep 2005 21:57:58 -0000 @@ -1074,7 +1074,7 @@ // joined with the next element. if (i == endOffset - 1) { - if (attr.isEqual(next.getAttributes())) + if (next.getAttributes().isEqual(attr)) spec.setDirection(ElementSpec.JoinNextDirection); } // If we are at the first new element, then check if it could be