On Mon, 18 Sep 2023 19:08:21 GMT, Alexey Ivanov <[email protected]> wrote:
>> I agree. There are some tests that start with passed as 'true', hence >> explicitly assigned 'false' to boolean var in these tests even though it is >> redundant as to add clarity when running the tests. > > 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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15769#discussion_r1329404647
