<Swing Dev> [15] RFR JDK-8231042: [macos] JFileChooser creates new folder on ESC
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Feb 27 11:02:18 UTC 2020
Hi, Pankaj.
It would be good to filter out the test on non-mac systems by the "@requires" tag.
On 2/25/20 8:43 am, Pankaj Bansal wrote:
> 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
>
--
Best regards, Sergey.
More information about the swing-dev
mailing list