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

Abhishek Kumar duke at openjdk.org
Wed Aug 10 05:55:09 UTC 2022


On Tue, 9 Aug 2022 19:02:36 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   suggested review comments updated
>
> src/java.desktop/share/classes/sun/swing/FilePane.java line 1202:
> 
>> 1200:                         updateMessageFormatPattern(kiloByteString,0);
>> 1201:                     } else {
>> 1202:                         updateMessageFormatPattern(kiloByteString,1);
> 
> There should a space after comma.

implemented the suggested change.

> test/jdk/javax/swing/JFileChooser/FileSizeCheck.java line 67:
> 
>> 65:         Path dir = Paths.get(System.getProperty("test.src"));
>> 66:         String [] tempFilesName = {"1-Empty-File", "2-File-2047-Byte", "3-File-2.5-KB", "4-File-999-KB", "5-File-1000-KB", "6-File-2.8-MB"};
>> 67:         int [] tempFilesSize = {0, 2047, 2500, 999000, 1000000, 2800000};
> 
> Hint: You can use `_` as a group separator in numeric literals: 1_000_000 is more readable.

Sure, I have implemented the suggested change.

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

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



More information about the client-libs-dev mailing list