RFR: 8312075: FileChooser.win32.newFolder is not updated when changing Locale [v5]
Alexey Ivanov
aivanov at openjdk.org
Thu Aug 31 15:44:02 UTC 2023
On Thu, 31 Aug 2023 15:30:01 GMT, Tejesh R <tr at openjdk.org> wrote:
>> test/jdk/javax/swing/JFileChooser/FileChooserNewFolderLocaleTest.java line 77:
>>
>>> 75: System.out.println("Failed to delete file : " +
>>> 76: newFolderEnglish.getName());
>>> 77: }
>>
>> It's a bit on the overthinking side yet you use the same code for both `newFolderEnglish` and `newFolderFrench`. A helper method to remove the folder and to print an error message would eliminate the duplicate code.
>
> Helper method meaning what I have done right?
Yes, a helper method which deletes a directory that you pass as a parameter and prints an error if it fails.
Then removing the two directories is a matter of calling this method twice: for the English and French directory.
You just got the condition wrong, it seems. The one you used previously looked correct.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15069#discussion_r1311832540
More information about the client-libs-dev
mailing list