This test was recently automated and is failing intermittently in the CI due to timing issues. This enhancement aims to stabilize the test and also adds the missing null pointer check.
------------- Commit messages: - Test stabilization Changes: https://git.openjdk.org/jdk/pull/26824/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26824&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8361387 Stats: 8 lines in 1 file changed: 5 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26824.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26824/head:pull/26824 PR: https://git.openjdk.org/jdk/pull/26824