RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v3]
Naoto Sato
naoto at openjdk.org
Thu Jul 7 16:14:44 UTC 2022
On Thu, 7 Jul 2022 07:06:57 GMT, Abhishek Kumar <duke at openjdk.org> wrote:
>> src/java.desktop/share/classes/sun/swing/FilePane.java line 1194:
>>
>>> 1192: setIcon(icon);
>>> 1193:
>>> 1194: } else if (value instanceof Long) {
>>
>> You could change this to `value instanceof Long len` so that the cast below can be eliminated.
>
> After replacing "value instanceof Long" by "value instanceof Long len" and removing the cast below (long len = value) results in build error. So, I guess cast is required to convert an object to long type.
You don't need to use `value` in this `if` statement any longer. Just use `len` inside (that's the whole purpose).
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list