[code-reflection] RFR: throw instead returning when erasing checked to unchecked exception [v2]

Paul Sandoz psandoz at openjdk.org
Thu Jan 18 20:13:51 UTC 2024


On Thu, 18 Jan 2024 16:47:05 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Done too, however I had to explicitly pass `MethodHandles.lookup()` now as the classes couldn't be found otherwise. I'm not sure why exactly though, as they are public.
>
> Hmm... I am not sure either, will take a look after this PR is integrated.

When using the public lookup the system class loader will be used to find classes given their binary names. When executing tests the test classes will be loaded in a child of the system class loader, hence they cannot be found using the system class loader. Not much that can be done about. It may be best to always require a lookup argument.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/2#discussion_r1457931008


More information about the babylon-dev mailing list