RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v17]

Abhishek Kumar duke at openjdk.org
Wed Aug 17 04:17:27 UTC 2022


On Tue, 16 Aug 2022 19:21:12 GMT, Phil Race <prr at openjdk.org> wrote:

>> It's reachable when `listViewWindowsStyle` is `false`, which seems to be the case in all the Look-and-Feels but Windows one.
>> 
>> Yet it looks confusing.
>
>> It's reachable when `listViewWindowsStyle` is `false`, which seems to be the case in all the Look-and-Feels but Windows one.
>> 
>> Yet it looks confusing.
> 
> We have
>                 if (listViewWindowsStyle) {
>                      ..
>                  } else if (len < 1024L) {
>                      ...
>                  } else if (len < 100L) {
> 
> So if listViewWindowsStyle is false then we get to < 1024 case and if there len is (say) 20
> we enter that, so as far as I can see we can never reach the < 100 case.

} else if (len < 1024L) {
...
} has been removed. 
So if listViewWindowStyle is false then the next else if condition will be executed i.e. <100L case.

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

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



More information about the client-libs-dev mailing list