Please review this change that eliminates the use of Reference.isEnqueued by tests. There were three tests using it:
vmTestbase/gc/gctests/ReferencesGC/ReferencesGC.java vmTestbase/gc/gctests/WeakReferenceGC/WeakReferenceGC.java jdk/java/lang/ref/ReferenceEnqueue.java In each of them, some combination of using Reference.refersTo and ReferenceQueue.remove with a timeout were used to eliminate the use of Reference.isEnqueued. I also cleaned up ReferencesGC.java in various respects. It contained several bits of dead code, and the failure checks were made stronger. Testing: mach5 tier1 Locally (linux-x64) ran all three tests with each GC (including Shenandoah). ------------- Commit messages: - update WeakReferenceGC test - update ReferenceQueue test - update ReferencesGC test Changes: https://git.openjdk.java.net/jdk/pull/1691/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1691&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8257876 Stats: 102 lines in 3 files changed: 21 ins; 39 del; 42 mod Patch: https://git.openjdk.java.net/jdk/pull/1691.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1691/head:pull/1691 PR: https://git.openjdk.java.net/jdk/pull/1691