RFR: 8299522: Incorrect size of Approve button in custom JFileChooser [v6]

Tejesh R tr at openjdk.org
Fri Jan 13 06:48:46 UTC 2023


On Thu, 12 Jan 2023 21:17:07 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Tejesh R has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Updated based on review comments
>
> test/jdk/javax/swing/JFileChooser/CustomApproveButtonTest.java line 80:
> 
>> 78:             if (customApproveButton == null) {
>> 79:                 fail("Cannot find Custom Approve Button in FileChooser!");
>> 80:                 return;
> 
> Suggestion:
> 
>                 throw new RuntimeException("Cannot find Approve button in FileChooser!");
> 
> It's just an Approve button.
> 
> Now that frame is disposed of separately, there's no need for `fail` method — throw the exception.

Updated.

> test/jdk/javax/swing/JFileChooser/CustomApproveButtonTest.java line 83:
> 
>> 81:             }
>> 82:             if (customApproveButton.getText() == null) {
>> 83:                 fail("Custom Approve Button Text is null in FileChooser!");
> 
> Suggestion:
> 
>                 fail("Approve button text is null in FileChooser!");

Updated.

> test/jdk/javax/swing/JFileChooser/CustomApproveButtonTest.java line 97:
> 
>> 95:     }
>> 96: 
>> 97:     private void setLookAndFeel(String laf) {
> 
> It can be `static` since it doesn't use any fields of the class.

Updated.

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

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



More information about the client-libs-dev mailing list