RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v17]
Abhishek Kumar
duke at openjdk.org
Fri Aug 12 18:41:35 UTC 2022
On Fri, 12 Aug 2022 18:35:11 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> MessageFormat.format method was truncating "0" from values like "0.0", "1.0" and so on.
>> Due to that I initialize MessageFormat and NumberFormat instance.
>>
>> The first parameter in updateMessageFormatPattern method changes based on file size, so calling it multiple times to update the pattern.
>> The second parameter can be removed.
>
>> MessageFormat.format method was truncating "0" from values like "0.0", "1.0" and so on. Due to that I initialize MessageFormat and NumberFormat instance.
>
> Got it.
>
>> The first parameter in updateMessageFormatPattern method changes based on file size, so calling it multiple times to update the pattern. The second parameter can be removed.
>
> Right, it makes sense. Please remove the second parameter.
>
> After the second parameter is removed, `NumberFormat` does not change though, so it can be initialised once.
Yeah sure, I will remove the second parameter.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list