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

JFileChooser throws NPE on Vista with Win LaF in new folder

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      x86
    • OS:
      windows_xp, windows_2008, windows_vista
    • Verification:
      Not verified

      Backports

        Description

        This issue was detected by PIT made for 6.0b105.

        This is reproduced on Windows Vista and with Windows LookAndFeel only. Steps to reproduce:

        1. Start FileChooserDemo with WinLaF
        2. Open JFileChooser
        3. Navigate to a folder where creation of new folders is allowed
        4. Click "New Folder" - a new one appears. Give it a name and press Enter
        5. Enter the newly created directory by pressing Enter
        6. Click Cancel.

        A NPE thrown:

        java.lang.NullPointerException
                at javax.swing.JComponent.repaint(JComponent.java:4728)
                at sun.swing.FilePane$2.repaintListSelection(FilePane.java:114)
                at sun.swing.FilePane$2.repaintSelection(FilePane.java:104)
                at sun.swing.FilePane$2.focusLost(FilePane.java:99)
                at java.awt.AWTEventMulticaster.focusLost(AWTEventMulticaster.java:213)
                at java.awt.Component.processFocusEvent(Component.java:5930)
                at java.awt.Component.processEvent(Component.java:5794)
                at java.awt.Container.processEvent(Container.java:2058)
                at java.awt.Component.dispatchEventImpl(Component.java:4410)
                at java.awt.Container.dispatchEventImpl(Container.java:2116)
                at java.awt.Component.dispatchEvent(Component.java:4240)
                at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
                at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:878)
                at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:551)
                at java.awt.Component.dispatchEventImpl(Component.java:4282)
                at java.awt.Container.dispatchEventImpl(Container.java:2116)
                at java.awt.Component.dispatchEvent(Component.java:4240)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
                at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
                at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
                at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
                at java.awt.Dialog$1.run(Dialog.java:1039)
                at java.awt.Dialog$3.run(Dialog.java:1091)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.awt.Dialog.show(Dialog.java:1089)
                at javax.swing.JFileChooser.showDialog(JFileChooser.java:722)
                at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:625)
                at FileChooserDemo$2.actionPerformed(FileChooserDemo.java:160)
                at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
                at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
                at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
                at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
                at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
                at java.awt.Component.processMouseEvent(Component.java:6038)
                at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
                at java.awt.Component.processEvent(Component.java:5803)
                at java.awt.Container.processEvent(Container.java:2058)
                at java.awt.Component.dispatchEventImpl(Component.java:4410)
                at java.awt.Container.dispatchEventImpl(Container.java:2116)
                at java.awt.Component.dispatchEvent(Component.java:4240)
                at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
                at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
                at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
                at java.awt.Container.dispatchEventImpl(Container.java:2102)
                at java.awt.Window.dispatchEventImpl(Window.java:2429)
                at java.awt.Component.dispatchEvent(Component.java:4240)
                at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
                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)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                rupashka Pavel Porvatov (Inactive)
                Reporter:
                loneid Leonid Popov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: