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

Phil Race prr at openjdk.org
Tue Aug 16 19:23:43 UTC 2022


On Thu, 11 Aug 2022 19:36:35 GMT, Alexey Ivanov <aivanov 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.

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.

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

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



More information about the client-libs-dev mailing list