JDK-8193563 : FileSystemView::getFiles throws SecurityException which is not mentioned in its specification.
  • Type: Bug
  • Component: client-libs
  • Affected Version: 8,9,10
  • Priority: P3
  • Status: In Progress
  • Resolution: Unresolved
  • Submitted: 2017-12-14
  • Updated: 2021-12-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Duplicate :  
Relates :  
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)