RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v16]
Abhishek Kumar
duke at openjdk.org
Thu Aug 11 10:04:21 UTC 2022
On Wed, 10 Aug 2022 19:30:29 GMT, Phil Race <prr at openjdk.org> wrote:
>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> updated as per review comments
>
> To have all files 1->1000 bytes be 1.0kB and yet 1,100 -> 1,200 bytes be 1.1kB does seem anomalous
> from a precision perspective, since the major order of magnitude would seem to be more important to describe.
>
> Since we already aren't going to say "bytes" for those small files, then just getting that precision with
> the decimal point seems better - as well as being consistent !
@prrace @aivanov-jdk I have modified the existing logic to show decimal precision for smaller files.
Added few test cases for files having size <1000 bytes.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list