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

Alexey Ivanov aivanov at openjdk.org
Mon Sep 12 10:47:07 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

Changes requested by aivanov (Reviewer).

src/java.desktop/share/classes/sun/swing/FilePane.java line 59:

> 57: import java.io.FileNotFoundException;
> 58: import java.text.DateFormat;
> 59: import java.text.DecimalFormat;

`DecimalFormat` has become unused.

src/java.desktop/share/classes/sun/swing/FilePane.java line 1212:

> 1210:                 if (listViewWindowsStyle) {
> 1211:                     updateMessageFormatPattern(kiloByteString);
> 1212:                     displayedFileSize[0] = roundToOneDecimalPlace(len);

Does it correctly display the file sizes when `listViewWindowsStyle` is `true`?

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

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



More information about the client-libs-dev mailing list