<AWT Dev> [12] RFR 8213583: Error while opening the JFileChooser when desktop contains shortcuts pointing to deleted files

Dmitry Markov dmitry.markov at oracle.com
Mon Nov 26 10:38:54 UTC 2018


Could you review a fix for jdk12, please?

 	bug: https://bugs.openjdk.java.net/browse/JDK-8213583 <https://bugs.openjdk.java.net/browse/JDK-8213583>
 	webrev: http://cr.openjdk.java.net/~dmarkov/8213583/webrev.00/ <http://cr.openjdk.java.net/~dmarkov/8213583/webrev.00/>

Problem description:
On Windows when a SecurityManager is defined and JFileChooser is opened for the folder which contains a broken shortcut the system popup message is displayed. The current implementation of ShellFolder for Windows calls IShellLinkW::Resolve without any flags. So the appearance of the dialog with system message for the broken shortcut is quite expected, see https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-ishelllinkw-resolve <https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-ishelllinkw-resolve>

It is necessary to use SLR_NO_UI flag to suppress any system dialogs during IShellLinkW::Resolve invocation.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20181126/dce078c8/attachment.html>

More information about the awt-dev mailing list