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

JFileChooser throws NullpointerException after JDK-8293862 in Windows

XMLWordPrintable

    • b07
    • 21
    • generic
    • windows

      Steps to reproduce:
      1. Run the attached manual test(JFileChooserCrashTest.java) with Windows L&F.
      java -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel JFileChooserCrashTest.java
      2. When the FileChooser opens up, navigate to 'Downloads' and try to open it.
      3. It throws NullpointerException and the user will not be able to navigate to anything else(attached screenshot) and there is no workaround for this, need to close the application.
      4. This is reproducible only in Windows and specifically with Windows L&F.
      5. This is reproducible when the user tries to open certain system folders(with an image icon) like 'Downloads', 'Libraries' etc.
      6. This seems to be a regression introduced by the fix of JDK-8293862 in JDK 21 b07.
      7. This crash is not reproducible with JDK 21 b06 or below, but another issue is reproducible there addressed by JDK-8293862 -> "Exception in thread "AWT-EventQueue-0" java.nio.file.InvalidPathException: Illegal char <:> at index 0: ::{031E4825-7B94-4DC3-B131-E946B44C8DD5}".
      8. It is not reproducible in JDK 23, possibly fixed by JDK-8320692.

            aivanov Alexey Ivanov
            mvs Manukumar V S
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: