RFR: 8304360: Test to ensure ConstantDescs fields work [v2]

ExE Boss duke at openjdk.org
Thu Mar 16 19:35:21 UTC 2023


On Thu, 16 Mar 2023 18:40:12 GMT, Chen Liang <liach at openjdk.org> wrote:

>> https://github.com/openjdk/jdk/pull/13033#issuecomment-1470857327
>> 
>> Add a test to validate that all constants in ConstantDescs can be resolved with a minimally-trusted lookup, and select constants represent the objects they claim to be.
>
> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Switch to DataProvider

There should probably also be tests for the [`DirectMethodHandleDesc`] fields which inspect the [`MethodHandleInfo`] obtained using [`MethodHandles::reflectAs​(Class, MethodHandle)`].

[`DirectMethodHandleDesc`]: https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/constant/DirectMethodHandleDesc.html
[`MethodHandleInfo`]: https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/invoke/MethodHandleInfo.html
[`MethodHandles::reflectAs​(Class, MethodHandle)`]: https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/lang/invoke/MethodHandles.html#reflectAs(java.lang.Class,java.lang.invoke.MethodHandle)

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

PR: https://git.openjdk.org/jdk/pull/13064


More information about the core-libs-dev mailing list