RFR: 6616245: NullPointerException when using JFileChooser with a custom FileView [v7]

Alexey Ivanov aivanov at openjdk.org
Tue Oct 11 08:50:30 UTC 2022


On Tue, 11 Oct 2022 07:57:26 GMT, Abhishek Kumar <duke at openjdk.org> wrote:

> Few lines are going beyond 80 columns, can you please update them?

I agree, line 80 could be wrapped, it's 92 columns long. At the same, I wouldn't have insisted because it contains the parameters to `PassFailJFrame` which aren't so important to understanding the logic of the test.

Line 92 with the position is better left untouched, it's not too long (five chars outside of 80-column limit) and it's cleaner unwrapped. You may statically-import `PassFailJFrame.Position` in which case the line would become shorter:

        PassFailJFrame.positionTestWindow(frame, Position.HORIZONTAL);


I am for keeping line 61 as it is now even though it doesn't fit the limit by 5 characters. It's still readable. In fact, this `throws` clause could be avoided altogether by restructuring the code. The constructor of `PassFailJFrame` is designed to be called on the main thread, yet Tejesh prefers it this way. I don't think it's worth moving the code around at this point when it's approved already.

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

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



More information about the client-libs-dev mailing list