RFR: 4834298: JFileChooser.getSelectedFiles() failed with multi-selection and double-click [v3]

Tejesh R tr at openjdk.org
Fri Sep 9 08:12:46 UTC 2022


On Thu, 8 Sep 2022 11:49:36 GMT, Jayathirth D V <jdv at openjdk.org> wrote:

>> Clearing the selection and setting it to null also solves the problem though. When we call clear selection, reset will happen and selectedFiles will be set.
>
> As discussed on call its better to clear selection when we move between multi-selection enabled/disabled as captured in https://github.com/openjdk/jdk/pull/9996#discussion_r965791205.
> 
> Because using getSelectedFile() to update setSelectedFiles() might cause state management issues in some other scenarios.

Yeah, I have updated as discussed on call and tested.

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

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



More information about the client-libs-dev mailing list