RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v7]
Abhishek Kumar
duke at openjdk.org
Thu Jul 21 06:47:23 UTC 2022
On Wed, 20 Jul 2022 15:47:38 GMT, Phil Race <prr at openjdk.org> wrote:
>> src/java.desktop/share/classes/sun/swing/FilePane.java line 1192:
>>
>>> 1190: setIcon(icon);
>>> 1191:
>>> 1192: } else if (value instanceof Long len) {
>>
>> I think this code needs to be extracted into a function, and a unit test added. Testing with different sizes and supported locales - let's say en_IN (Asian group separator) and ja_JP or zh_CN (no plural forms).
>
> JDK does not do unit tests in this way. There is no place to put it.
> We do functional "system" level regression tests.
I guess extracting this code to a function won't give much advantage as it is not called from multiple places.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list