[jdk25u-dev] RFR: 8373832: Test java/lang/invoke/TestVHInvokerCaching.java tests nothing

duke duke at openjdk.org
Thu Jan 29 15:38:44 UTC 2026


On Tue, 27 Jan 2026 17:02:52 GMT, Roland Mesde <duke at openjdk.org> wrote:

> 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
> 
> Results attached:
> 
> [linux-aarch64-specific-test.log](https://github.com/user-attachments/files/24893636/linux-aarch64-specific-test.log)
> [linux-x64-specific-test.log](https://github.com/user-attachments/files/24893637/linux-x64-specific-test.log)
> [macos-aarch64-specific-test.log](https://github.com/user-attachments/files/24893638/macos-aarch64-specific-test.log)
> [windows-x64-specific-test.log](https://github.com/user-attachments/files/24893639/windows-x64-specific-test.log)

@rm-gh-8 
Your change (at version 88a9cdf0bd1a14b0fcca35af4c1ea5cc24df093c) is now ready to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/jdk25u-dev/pull/187#issuecomment-3818455995


More information about the jdk-updates-dev mailing list