RFR: 8159746: (proxy) Support for default methods

Peter Levart plevart at openjdk.java.net
Tue Sep 29 07:48:13 UTC 2020


On Mon, 28 Sep 2020 16:57:16 GMT, Mandy Chung <mchung at openjdk.org> wrote:

>> @AlanBateman you meant to say throwing CCE for mismatching parameter case would make it **inconsistent** with
>> Method.invoke, right? That's easy to change. We just catch CCE (and NPE?) and re-throw them wrapped in IAE. We don't
>> need to do that via MH combinators. Just directly in code. Performance will remain the same.
>
>> @AlanBateman you meant to say throwing CCE for mismatching parameter case would make it **inconsistent** with
>> Method.invoke, right? That's easy to change. We just catch CCE (and NPE?) and re-throw them wrapped in IAE. We don't
>> need to do that via MH combinators. Just directly in code. Performance will remain the same.
> 
> Right, `Method::invoke` throws IAE (not CCE).

So here's a patch on top of my last patch that reverts the exception behaviour back to be consistent with Method::invoke
https://github.com/mlchung/jdk/pull/1

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

PR: https://git.openjdk.java.net/jdk/pull/313


More information about the core-libs-dev mailing list