RFR: 8376533: Remove test dependencies on ReferenceQueue$Lock in preparation for JDK-8376477
Eirik Bjørsnøs
eirbjo at openjdk.org
Fri Feb 6 09:35:06 UTC 2026
On Tue, 27 Jan 2026 21:11:05 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:
> Please review this PR which updates a few JDK tests to not depend on the existence of `java.lang.ref.ReferenceQueue$Lock` and `java.lang.Shutdown$Lock` classes. These are suggested for removal in JDK-8376477, see #29442.
>
> * `ClhsdbInspect` is updated to use add a nested Lock class in the sample app and use that instead.
> * `ConcurrentAssociateTest` and `Phaser/Basic` are updated to not use lock name when filtering threads to dump for debugging purposes when failing.
> * `ImageReaderBenchmark` micro is updated to remove these classes from the list of expected system image resource names
>
> I have verified that these tests now run with or without the `Lock` classes present in the JDK. I called the thread dump debug methods manually to verify them since these only run on test failure. GHA run passes.
>
> Test only change/cleanup. `noreg-self`
Friendly reminder that this test-only PR is looking for a reviewer in the servicability area.
Specifically, we need someone to look at `test/hotspot/jtreg/serviceability/sa/ClhsdbInspect.java` and verify that it's okay to use a custom nested class in the test app instead of relying on JDK internals in `ReferenceQueue`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29455#issuecomment-3859095577
More information about the serviceability-dev
mailing list