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

JComboBox.selectWithKeyChar throw a NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.1
    • 1.3.1_01
    • client-libs
    • None
    • hopper
    • generic
    • linux
    • Verified

      The RI fails with JavaTest (2.4), test: api/javax_swing/interactive/JComboBoxTests.html, JComboBoxTest0004

      How to reproduce:
      See a list, press shift => get a null pointer exception for each time you press the key.


      Output log:

      Exception occurred during event dispatching:
      java.lang.NullPointerException
       at javax.swing.JComboBox$DefaultKeySelectionManager.selectionForKey(JComboBox.java:1166)
       at javax.swing.JComboBox.selectWithKeyChar(JComboBox.java:991)
       at javax.swing.plaf.basic.BasicComboBoxUI$KeyHandler.keyPressed(BasicComboBoxUI.java:390)
       at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:190)
       at java.awt.Component.processKeyEvent(Component.java:3677)
       at javax.swing.JComponent.processKeyEvent(JComponent.java:2014)
       at java.awt.Component.processEvent(Component.java:3553)
       at java.awt.Container.processEvent(Container.java:1164)
       at java.awt.Component.dispatchEventImpl(Component.java:2593)
       at java.awt.Container.dispatchEventImpl(Container.java:1213)
       at java.awt.Component.dispatchEvent(Component.java:2497)
       at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)
       at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)
       at java.awt.Container.dispatchEventImpl(Container.java:1200)
       at java.awt.Window.dispatchEventImpl(Window.java:926)
       at java.awt.Component.dispatchEvent(Component.java:2497)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
       at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:131)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

            peterz Peter Zhelezniakov
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: