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

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jul 13 06:28:19 UTC 2022


On Wed, 13 Jul 2022 06:20:06 GMT, Abhishek Kumar <duke at openjdk.org> wrote:

>> JFileChooser - empty file size issue fixed. 
>> For empty file, now the size 0 bytes.
>> Manual Test Case "ZeroFileSizeCheck.java" created.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
> 
>   alignment, newline and bytes handling fix

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

> 1201:                     }
> 1202:                 } else if (len < 1024L) {
> 1203:                     text = MessageFormat.format(byteString, len);

For len < 1024 say 433, does it now show 433 bytes or 433 B? 
Since in resource file, you are using {0} B and not {0} bytes..I guess in ubuntu native, it shows 433 bytes and not 433 B..

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

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



More information about the client-libs-dev mailing list