RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v2]

Tejesh R tr at openjdk.org
Tue Oct 4 05:50:17 UTC 2022


On Mon, 3 Oct 2022 11:29:14 GMT, Tejesh R <tr at openjdk.org> wrote:

>> test/jdk/javax/swing/JFileChooser/FileViewNPETest.java line 114:
>> 
>>> 112:         } else {
>>> 113:             return false;
>>> 114:         }
>> 
>> It can be simplified to:
>> Suggestion:
>> 
>>         return ((filePath != null) && (filePath.isDirectory())
>>                 && filePath.getAbsolutePath().startsWith(basePath));
>> 
>> I'm not insisting though.
>
> Can be done, no issues.

Updated.

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

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



More information about the client-libs-dev mailing list