RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v30]
Alexey Ivanov
aivanov at openjdk.org
Thu Sep 29 12:29:26 UTC 2022
On Wed, 28 Sep 2022 17:23:55 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:
>
> modifiers order changed as per review comment
src/java.desktop/share/classes/sun/swing/FilePane.java line 1129:
> 1127: static final double baseFileSize = 1000.0;
> 1128: final MessageFormat mf = new MessageFormat("");
> 1129: final NumberFormat nf = NumberFormat.getNumberInstance();
All these three new fields can be declared `private`, they aren't used anywhere else. For the sake of consistency, the existing fields `chooser` and `df` may also be declared `private` if they're unused outside of this class.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list