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

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Jul 13 07:17:48 UTC 2022


On Wed, 13 Jul 2022 07:11:16 GMT, Abhishek Kumar <duke at openjdk.org> wrote:

>> i guess it's not right then, no? if you are changing to mimic native, then it should be "bytes" and not "B". Just for 1 byte case, you cannot compromise on other file size(s), in my opinion.
>> Also, what's the likelihood of having 1 byte file, I guess it's very rare. If you type a character, it will be shown as 2 bytes.
>
> In that case to handle 1 byte, do i need to add separate property in properties file?
> If filesize=1 then can get "byte" string from properties file and can format using MessageFormat?

am not sure if resource file can support {1} byte case...if that is supported, then you can use that...but likelihood of 1 byte file is very rare so I guess we can ignore it, that's my opinion.

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

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



More information about the client-libs-dev mailing list