RFR: JDK-8320675 : PrinterJob/SecurityDialogTest.java hangs [v2]

Alexey Ivanov aivanov at openjdk.org
Fri Mar 15 10:45:39 UTC 2024


On Fri, 15 Mar 2024 06:45:57 GMT, Tejesh R <tr at openjdk.org> wrote:

>> Most of the test with PassFailJFrame instruction stored as string inside class, what additional benefit will get keeping it inside Main ?
>
> When it can become local variable then why to keep it in class? Not like significant benefit maybe, but yeah just to keep its scope locally when it can be.

> INSTRUCTIONS can be moved inside main.

No. Well, it can but what's the point?

I find a value in having the instructions as a dedicated constant at the top of the file. When you open the test, the instructions will be the first thing you see, and it's what you need after reading the summary in `@summary` tag above the class declaration.

>> For me its building and running properly
>
> Ok, might be an issue from my side. Will look into it.

> I am getting an error for using `new PassFailJFrame passFailJFrame = new PassFailJFrame.Builder()`, stating *"'Builder()' has private access in 'PassFailJFrame.Builder'"*. Probably because I have fetched latest `PassFailJFrame`.

@TejeshR13 You're absolutely right. Thanks for catching it.

> And also you can use `PassFailJFrame.builder()` method.

Not *can* but *must*.

The test won't work after it's integrated, it won't compile.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18299#discussion_r1526081314
PR Review Comment: https://git.openjdk.org/jdk/pull/18299#discussion_r1526084123


More information about the client-libs-dev mailing list