On Wed, 25 Oct 2023 03:23:01 GMT, Renjith Kannath Pariyangad <[email protected]>
wrote:
>> Hi Reviewers,
>>
>> I have added additional CountDownLatch for making sure button is visible
>> before proceeding,(observe this was one of the key reason for failure) so
>> this helps to improve test case stability. Modified _await()_ function by
>> adding 1sec timeout with exception, this will help to reduce total execution
>> time in case of failure.
>> Please review and let me know your suggestions, if any.
>
> Renjith Kannath Pariyangad has updated the pull request incrementally with
> one additional commit since the last revision:
>
> Suggestions integrated
Changes requested by aivanov (Reviewer).
test/jdk/java/awt/event/MouseWheelEvent/WheelModifier/WheelModifier.java line
175:
> 173: if (test.f != null) {
> 174: SwingUtilities.invokeAndWait(test.f::dispose);
> 175: }
This is still not *thread-safe*, you've missed the suggested changes: the
`null`-check must also be inside `invokeAndWait`:
Suggestion:
SwingUtilities.invokeAndWait(() -> {
if (test.f != null) {
test.f.dispose();
}
});
-------------
PR Review: https://git.openjdk.org/jdk/pull/16281#pullrequestreview-1697655892
PR Review Comment: https://git.openjdk.org/jdk/pull/16281#discussion_r1371943516