RFR: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB [v16]
Abhishek Kumar
duke at openjdk.org
Thu Aug 25 05:13:48 UTC 2022
On Mon, 22 Aug 2022 15:33:27 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> @prrace
>>
>> } else if (len < 1024L) {
>> ...
>> } has been removed in previous commit.
>> So if listViewWindowsStyle is false then the next else if will be executed i.e. <100L.
>
>> } else if (len < 1024L) { ... } has been removed in previous commit. So if listViewWindowsStyle is false then the next else if will be executed i.e. <100L.
>
> For clarity, would it be better to separate the cases?
>
>
> if (listViewWindowsStyle) {
> if (len == 0) {
> } else {
> if (len < 100L) {
> }
>
>
> This would increase the indentation level, yet it would make the code clearer. Now two independent conditions are chained.
@aivanov-jdk Comments and method name has been changed as suggested.
-------------
PR: https://git.openjdk.org/jdk/pull/9327
More information about the client-libs-dev
mailing list