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

Alexey Ivanov aivanov at openjdk.org
Fri Aug 12 20:08:27 UTC 2022


On Fri, 12 Aug 2022 19:56:53 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:
> 
>   Updated as per suggested changes

Marked as reviewed by aivanov (Reviewer).

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

> 1185:             String text;
> 1186:             Object[] objs = new Object[1];
> 1187:             nf.setMinimumFractionDigits(1);

I'd rather put that into constructor. It's to be run once rather than each time `getTableCellRendererComponent` is called.

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

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



More information about the client-libs-dev mailing list