bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/27834] New: Second and subsequent .setText calls fail on JTex


From: audriusa at bluewin dot ch
Subject: [Bug swing/27834] New: Second and subsequent .setText calls fail on JTextPane with html content type
Date: 31 May 2006 09:58:26 -0000

The first attempt to display the simple html document (plain text only, no
formatting) succeeds and the second and subsequent attempts fail with the
following exception:

Caused by: java.lang.ArrayIndexOutOfBoundsException: 4089
   at
javax.swing.text.GapContent$GapContentPosition.getOffset(GapContent.java:113)
   at
javax.swing.text.AbstractDocument$LeafElement.getStartOffset(AbstractDocument.java:2310)
   at
javax.swing.text.AbstractDocument$BranchElement.getStartOffset(AbstractDocument.java:1857)
   at javax.swing.text.View.getStartOffset(View.java:282)
   at
javax.swing.text.CompositeView.getViewIndexAtPosition(CompositeView.java:470)
   at javax.swing.text.CompositeView.getViewIndex(CompositeView.java:381)
   at javax.swing.text.View.forwardUpdate(View.java:498)
   at javax.swing.text.BoxView.forwardUpdate(BoxView.java:916)
   at javax.swing.text.View.removeUpdate(View.java:405)
   at
javax.swing.plaf.basic.BasicTextUI$RootView.removeUpdate(BasicTextUI.java:327)
   at
javax.swing.plaf.basic.BasicTextUI$DocumentHandler.removeUpdate(BasicTextUI.java:472)
   at
javax.swing.text.AbstractDocument.fireRemoveUpdate(AbstractDocument.java:318)
   at javax.swing.text.AbstractDocument.removeImpl(AbstractDocument.java:759)
   at javax.swing.text.AbstractDocument.remove(AbstractDocument.java:735)
   at javax.swing.JEditorPane.setText(JEditorPane.java:928)
   ...19 more

I mark this as Swing because the exception is thrown from the swing classes,
not from the HTML parser or text.html. However if the content type is set to
the text/plain, the repetetive calls succeed.

The test case (hope will be a html demo in the future) is attached.


-- 
           Summary: Second and subsequent .setText calls fail on JTextPane
                    with html content type
           Product: classpath
           Version: 0.92
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: swing
        AssignedTo: roman at kennke dot org
        ReportedBy: audriusa at bluewin dot ch


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27834





reply via email to

[Prev in Thread] Current Thread [Next in Thread]