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

Abhishek Kumar duke at openjdk.org
Wed Jul 13 06:28:19 UTC 2022


On Wed, 13 Jul 2022 05:20:39 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> 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..

It will show 433 B now, in ubuntu native it shows 433 bytes. 
bytes replaced by B to handle plural forms, otherwise for 1 byte file it show 1 bytes.

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

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



More information about the client-libs-dev mailing list