RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v27]
Alexey Ivanov
aivanov at openjdk.org
Mon Sep 12 10:57:59 UTC 2022
On Fri, 9 Sep 2022 17:24:17 GMT, Abhishek Kumar <duke at openjdk.org> wrote:
>> JFileChooser - empty file size issue fixed.
>> For empty file, now the size 0 KB.
>> Manual Test Case "FileSizeCheck.java" created.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comments fix
With lots of comments, it has become hard to see the changes in the code.
The updated code in `FilePane.java`:
* [File size formatting](https://github.com/openjdk/jdk/blob/99224c1c9c82aa2882f001cfd5bf9597c871b4b3/src/java.desktop/share/classes/sun/swing/FilePane.java#L1198-L1231)
* Helper method [`updateMessageFormatPattern`](https://github.com/openjdk/jdk/blob/99224c1c9c82aa2882f001cfd5bf9597c871b4b3/src/java.desktop/share/classes/sun/swing/FilePane.java#L1245-L1248)
* Helper method [`roundToOneDecimalPlace`](https://github.com/openjdk/jdk/blob/99224c1c9c82aa2882f001cfd5bf9597c871b4b3/src/java.desktop/share/classes/sun/swing/FilePane.java#L1258-L1260)
The links above are anchored to Abhishek's latest commit: [99224c1](https://github.com/openjdk/jdk/pull/9327/commits/99224c1c9c82aa2882f001cfd5bf9597c871b4b3) on Sep 9.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list