[jdk25u-dev] RFR: 8373832: Test java/lang/invoke/TestVHInvokerCaching.java tests nothing
Roland Mesde
duke at openjdk.org
Tue Jan 27 17:37:33 UTC 2026
Backporting JDK-8373832: Test java/lang/invoke/TestVHInvokerCaching.java tests nothing.
This PR fixes a test bug where getFields() is incorrectly used to discover package-private fields. Since getFields() only returns public fields, no VarHandle was actually being tested, causing a newly added assertFalse to fail.
For parity with Oracle JDK.
Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
make test TEST=test/jdk/java/lang/invoke/TestVHInvokerCaching.java
-------------
Commit messages:
- Backport e75726ee03ca4664827ca5d680c02bcf2a96f4ea
Changes: https://git.openjdk.org/jdk25u-dev/pull/187/files
Webrev: https://webrevs.openjdk.org/?repo=jdk25u-dev&pr=187&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8373832
Stats: 5 lines in 1 file changed: 2 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk25u-dev/pull/187.diff
Fetch: git fetch https://git.openjdk.org/jdk25u-dev.git pull/187/head:pull/187
PR: https://git.openjdk.org/jdk25u-dev/pull/187
More information about the jdk-updates-dev
mailing list