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

REG: File Dialog throws ArrayIndexOutOfBounds Exception on XToolkit with b45

XMLWordPrintable

    • b49
    • sparc
    • solaris_10
    • Verified

      I have attached a sample test. Execute the sample test on SolarisSparc10-JDS with Mustang-b45. You would see a frame with 2 buttons. Focus will be shown on the 'Open' Button. Press SPACE BAR. A file dialog will be opened. Press the SPACE BAR again. You would see ArrayIndexOutOfBoundsException on the console. (Do not use mouse to reproduce the bug)

      This is reproducible only with Mustang-b45 and not on b44. This is reproducible only on XToolkit and not on win32.

      When I compared the behavior between b44 and b45, the default focus is given to the FOLDER list in the file dialog when it gets opened on b45 whereas on b44, the default focus stays with 'Enter path or folder name' field.
      Here is the exception:
      java.lang.ArrayIndexOutOfBoundsException: -1
              at java.util.Vector.elementAt(Vector.java:432)
              at java.awt.List.getItemImpl(List.java:292)
              at java.awt.List.getItem(List.java:284)
              at sun.awt.X11.XFileDialogPeer.itemStateChanged(XFileDialogPeer.java:508)
              at java.awt.List.processItemEvent(List.java:1077)
              at java.awt.List.processEvent(List.java:1041)
              at java.awt.Component.dispatchEventImpl(Component.java:4359)
              at java.awt.Component.dispatchEvent(Component.java:4193)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:175)
              at java.awt.Dialog$1.run(Dialog.java:1029)
              at java.awt.Dialog.show(Dialog.java:1067)
              at java.awt.Component.show(Component.java:1405)
              at java.awt.Component.setVisible(Component.java:1358)
              at java.awt.Window.setVisible(Window.java:577)
              at java.awt.Dialog.setVisible(Dialog.java:961)
              at FileDialogTest.actionPerformed(FileDialogTest.java:36)
              at java.awt.Button.processActionEvent(Button.java:388)
              at java.awt.Button.processEvent(Button.java:356)
              at java.awt.Component.dispatchEventImpl(Component.java:4359)
              at java.awt.Component.dispatchEvent(Component.java:4193)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:270)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:198)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:171)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:166)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:158)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:119)

            dcherepanov Dmitry Cherepanov
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: