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

FileSystemView::getFiles throws SecurityException which is not mentioned in its specification.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, 9, 10
    • Fix Version/s: tbd
    • Component/s: client-libs
    • Labels:
      None

      Description

      When SecurityManager is used on Windows platform selecting a virtual shell folder (Network Neighborhood, My Computer, etc...) in JFileChooser may result in SecurityException which is not caught in JFileChooser and this method result is not mentioned in the method specification.

      Visually it causes JFC to show the waiting cursor infinetly since it cannot accomplish the recuested action.
      ======
      Exception in thread "Basic L&F File Loading Thread" java.security.AccessControlException: access denied ("java.io.FilePermission" "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}" "read")
      at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
      at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
      at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:558)
      at java.base/java.lang.SecurityManager.checkRead(SecurityManager.java:897)
      at java.desktop/sun.awt.shell.Win32ShellFolder2.listFiles(Win32ShellFolder2.java:738)
      at java.desktop/javax.swing.filechooser.FileSystemView.getFiles(FileSystemView.java:564)
      at java.desktop/javax.swing.plaf.basic.BasicDirectoryModel$FilesLoader.run0(BasicDirectoryModel.java:290)
      at java.desktop/javax.swing.plaf.basic.BasicDirectoryModel$FilesLoader.run(BasicDirectoryModel.java:279)
      at java.base/java.lang.Thread.run(Thread.java:844)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kaddepalli Krishna Addepalli
              Reporter:
              ssadetsky Semyon Sadetsky (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: