RFR: 8296198: JFileChooser throws InternalError java.lang.InternalError with Windows shortcuts

Sergey Bylokhov serb at openjdk.org
Tue Dec 6 09:36:12 UTC 2022


On Mon, 5 Dec 2022 11:35:11 GMT, Tejesh R <tr at openjdk.org> wrote:

> When `JFileChooser` uses custom `FileSystemView`, traversing to link/shortcut to a folder throw `InternalError java.lang.InternalError ` in Windows. The issue found out to be in BasicFileChooserUI class which was unable to resolve the link path during directory setting. The `UsesShellFolder` check expects the FileSystemView to be of WindowsFileSystemView, which fails when custom FileSystemView is used.
> The fix includes resolving the link folder when custom File System View is used and has manual test. (Fix is test in CI system and no regression caused).

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java line 1433:

> 1431:                     return;
> 1432:                 }
> 1433:             } else if ( fc.getFileSystemView().isLink(dir)) {

Probably we can minimize the code duplication here?

-------------

PR: https://git.openjdk.org/jdk/pull/11510



More information about the client-libs-dev mailing list