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

FileDialog throws NPE when selecting /media/floppy on Linux, XToolkit

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b67
    • CPU:
      x86
    • OS:
      linux_sun
    • Verification:
      Verified

      Description

      I am running an application which opens up a FileDialog. I am selecting the root of the file system ('/'). After that, I am selecting /media/floppy folder. As soon as I click the floppy folder, a NPE is thrown on the console.

      This is reproducible only on Linux with all mustang, tiger builds with XAWT. Not reproducible on Motif. Not reproducible on SolSparc. I reproduced it with Mustang-b61 on Cinnabar as well as SuSE10.

      I have attached a sample test. Execute the sample test. Click one of the buttons shown on the frame. A file dialog would appear. Navigate to /media/floppy folder. You would see a NullPointerException on the console.

      Here is the exception:

      java.lang.NullPointerException
      at java.util.Arrays.sort(Arrays.java:1081)
      at sun.awt.X11.XFileDialogPeer.setFilterEntry(XFileDialogPeer.java:427)
      at sun.awt.X11.XFileDialogPeer.handleFilter(XFileDialogPeer.java:341)
      at sun.awt.X11.XFileDialogPeer.actionPerformed(XFileDialogPeer.java:560)
      at java.awt.List.processActionEvent(List.java:1108)
      at java.awt.List.processEvent(List.java:1044)
      at java.awt.Component.dispatchEventImpl(Component.java:4365)
      at java.awt.Component.dispatchEvent(Component.java:4195)
      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:1032)
      at java.awt.Dialog$2.run(Dialog.java:1078)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.awt.Dialog.show(Dialog.java:1076)
      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 java.awt.Dialog.setVisible(Dialog.java:972)
      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:4365)
      at java.awt.Component.dispatchEvent(Component.java:4195)
      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

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: