Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6362994

REG: JEditorPane throws Exception when opening a RTF file containing bullets, WinXP

    Details

    • Subcomponent:
    • Resolved In Build:
      b76
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      I am trying to open a RTF file using JEditorPane and the rtf file contains lot of formatted text and bullets. When running this application on Mustang, I am getting an ArrayIndexOutOfBoundsException on WinXP. This is not reproducible on Tiger-FCS and the file is loaded properly. Hence it is a regression introduced in Mustang somewhere before b10. Fix recommended for RC.

      Here is the exception:
      Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
      at javax.swing.text.CompositeView.getView(CompositeView.java:143)
      at javax.swing.text.FlowView$FlowStrategy.createView(FlowView.java:631)
      at javax.swing.text.FlowView$FlowStrategy.layoutRow(FlowView.java:489)
      at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:446)
      at javax.swing.text.FlowView.layout(FlowView.java:183)
      at javax.swing.text.BoxView.setSize(BoxView.java:379)
      at javax.swing.text.BoxView.updateChildSizes(BoxView.java:348)
      at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:330)
      at javax.swing.text.BoxView.layout(BoxView.java:682)
      at javax.swing.text.BoxView.setSize(BoxView.java:379)
      at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1638)
      at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:827)
      at javax.swing.JComponent.getPreferredSize(JComponent.java:1649)
      at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1256)
      at javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:769)
      at java.awt.Container.layout(Container.java:1395)
      at java.awt.Container.doLayout(Container.java:1384)
      at java.awt.Container.validateTree(Container.java:1467)
      at java.awt.Container.validateTree(Container.java:1474)
      at java.awt.Container.validateTree(Container.java:1474)
      at java.awt.Container.validateTree(Container.java:1474)
      at java.awt.Container.validateTree(Container.java:1474)
      at java.awt.Container.validate(Container.java:1442)
      at java.awt.Window.show(Window.java:714)
      at java.awt.Component.show(Component.java:1406)
      at java.awt.Component.setVisible(Component.java:1359)
      at java.awt.Window.setVisible(Window.java:695)
      at JEditorPaneTest.<init>(JEditorPaneTest.java:38)
      at JEditorPaneTest.main(JEditorPaneTest.java:75)

      I have attached a sample test and a rtf file. Run it as follows:
      'java JEditorPaneTest sample.rtf'
      If you see the above exception on the console, the bug is reproduced.

        Attachments

          Activity

            People

            • Assignee:
              mknyazevsunw Michael Knyazev (Inactive)
              Reporter:
              pmohansunw Praveen Mohan (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: