[code-reflection] RFR: throw instead returning when erasing checked to unchecked exception [v2]
Paul Sandoz
psandoz at openjdk.org
Thu Jan 18 16:50:54 UTC 2024
On Thu, 18 Jan 2024 08:37:00 GMT, Hannes Greule <hgreule at openjdk.org> wrote:
>> test/jdk/java/lang/reflect/code/interpreter/TestThrowing.java line 55:
>>
>>> 53: static Object[][] testData() throws NoSuchMethodException {
>>> 54: return new Object[][]{
>>> 55: {"throwsError", Error.class},
>>
>> Suggestion, up to you. Use specific exception to this test, there by differentiating between generic ones that might be thrown in error e.g., create `static class TestError extends Error {}`
>
> 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.
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/2#discussion_r1457722786
More information about the babylon-dev
mailing list