On Fri, 23 Sep 2022 11:11:12 GMT, Tejesh R <t...@openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Comment added and test case condotion update
>
> src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java
>  line 436:
> 
>> 434:                 int index = list.locationToIndex(e.getPoint());
>> 435:                 File currentDirectory = 
>> getFileChooser().getCurrentDirectory();
>> 436:                 if (currentDirectory.getParentFile() == null && index 
>> == 1) {
> 
> Adding a Comment explaining the statement `index == 1` would be better to 
> understand that it signifies root directory index.

Added a comment. 
Basically, `getParentFile` method is used to check root directory and `index == 
1` is the index of `../` directory.

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

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

Reply via email to