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

JEditorPane throws ArrayIndexOutOfBoundsException when copy & paste are done

    XMLWordPrintable

    Details

      Description

      Following exception were thrown. Please refer to the reproduction steps below.
      java.lang.ArrayIndexOutOfBoundsException: -1
              at javax.swing.text.CompositeView.getView(CompositeView.java:143)
              at javax.swing.text.FlowView$FlowStrategy.layout(FlowView.java:429)
              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.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.modelToView(BasicTextUI.java:956)
              at javax.swing.text.DefaultCaret.setVisible(DefaultCaret.java:949)
              at javax.swing.text.DefaultCaret.focusGained(DefaultCaret.java:332)
              at java.awt.AWTEventMulticaster.focusGained(AWTEventMulticaster.java:162)
              at java.awt.Component.processFocusEvent(Component.java:5844)
              at java.awt.Component.processEvent(Component.java:5711)
              at java.awt.Container.processEvent(Container.java:1960)
              at java.awt.Component.dispatchEventImpl(Component.java:4365)
              at java.awt.Container.dispatchEventImpl(Container.java:2018)
              at java.awt.Component.dispatchEvent(Component.java:4195)
              at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1828)
              at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:861)
              at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:501)
              at java.awt.Component.dispatchEventImpl(Component.java:4237)
              at java.awt.Container.dispatchEventImpl(Container.java:2018)
              at java.awt.Component.dispatchEvent(Component.java:4195)
              at sun.awt.SunToolkit$4.run(SunToolkit.java:601)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160) at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)



      Reproduce steps.
      1. Obtain testsuite. Expand it.
      /net/sqe1/quality2/i18n/workspaces/i18n_mustang_ws/i18n/bundles/b07/gs16-b07.tar.gz
      2. Move to i18n_mustang_ws/i18n/src/GS and run following.
      sh run_gs.sh -jdk:$JAVA_HOME font-render/swing/three/JEditorPaneTest.java
      3. Test -> getActions
      4. At the second line for example, select "selection", then Copy.
      5. Keep the selection as it is and Paste.
      The test should now exits with above exception.
      Tested on Solaris 10, Windows XP, and RedHatEL4. Reproduced on all the platforms.

        Attachments

          Activity

            People

            Assignee:
            mknyazevsunw Michael Knyazev (Inactive)
            Reporter:
            ogino Shinya Ogino (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: