RFR: 8376533: Remove test dependencies on ReferenceQueue$Lock in preparation for JDK-8376477
Aleksey Shipilev
shade at openjdk.org
Wed Jan 28 14:49:41 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`
This looks fine to me. But yes, @plummercj or some other SA maintainer needs to confirm we are good there.
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29455#pullrequestreview-3717115443
More information about the core-libs-dev
mailing list