RFR: JDK-8315876 Open source several Swing CSS related tests [v4]

Alexey Ivanov aivanov at openjdk.org
Tue Sep 19 10:35:49 UTC 2023


On Tue, 19 Sep 2023 00:03:34 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> With volatile, it makes the test slightly slower. Other than that, there's not much harm.
>> 
>> In most of these tests, there's no need for the `passed` field at all: you can throw the exception from the code where you set the value to `passed`, however, the stack trace will be less pretty because it will come from EDT.
>
> Yes, it shows up as InvocationTarget Exception first and after looking through the stacktrace the reason for failure is evident. Hence retaining the passed boolean variable as-is for clarity.

It's up to you.

However, if you don't expect the test to fail, it is safe to reduce the code size, `InvocationTargetException` still has the details one needs to diagnose the failure, and our CI shows them.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329913577


More information about the client-libs-dev mailing list