<Swing Dev> [15] RFR JDK-8231042: [macos] JFileChooser creates new folder on ESC

Pankaj Bansal pankaj.b.bansal at oracle.com
Tue Feb 25 16:43:41 UTC 2020


Hi All,

Please review the following fix for jdk15.


Bug: 

https://bugs.openjdk.java.net/browse/JDK-8231042

 

webrev:

http://cr.openjdk.java.net/~pbansal/8231042/webrev00/

 

 

Issue:

In case of AquaLookAndFeel, if a JFileChooser is created and if we try to abort the "New Folder" create action by pressing "ESC" key, there is a new folder created named " uninitializedValue". If the new folder creation is aborted, it should not create any folder as pressing "ESC" key is equivalent to cancelling the folder creation.

 

Cause:

In JFileChooser, the check if the JOptionPane is cancelled is missing. This issue is specific to AquaLookAndFeel.

 

Fix:                                                                                                                              

The fix is to add the required check in JFileChoose create NewFolder Action for a Cancelled JOptionPane. I this case, no folder should be created.

 


Regards,
Pankaj Bansal

 

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/swing-dev/attachments/20200225/b2d46c72/attachment.htm>


More information about the swing-dev mailing list