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

Abhishek Kumar duke at openjdk.org
Thu Sep 29 14:39:07 UTC 2022


On Thu, 29 Sep 2022 12:27:03 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> 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. If modified, both `chooser` and `df` can be `final` too, they're initialised in the constructor and never changed afterwards.

@aivanov-jdk Updated the suggested changes.

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

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



More information about the client-libs-dev mailing list