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

Alexey Ivanov aivanov at openjdk.org
Fri Aug 12 18:37:24 UTC 2022


On Fri, 12 Aug 2022 14:49:18 GMT, Abhishek Kumar <duke 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.

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.

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

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



More information about the client-libs-dev mailing list