The notification that finalize is complete should be done after printing the message because in Xcomp mode there might be a significant delay at the println so the object hasn't actually been finalized yet.
------------- Commit messages: - 8343213: TEST_BUG: [Graal] java/lang/ref/Basic.java fails Changes: https://git.openjdk.org/jdk/pull/21767/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21767&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8343213 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/21767.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/21767/head:pull/21767 PR: https://git.openjdk.org/jdk/pull/21767