RFR: 8159746: (proxy) Support for default methods

Mandy Chung mchung at openjdk.java.net
Thu Oct 22 17:11:13 UTC 2020


On Thu, 22 Oct 2020 14:23:13 GMT, Alan Bateman <alanb at openjdk.org> wrote:

> NewInvocationHandler/DefaultMethodInvoker feels a bit awkward. If I have it right, to use it as a lambda expression to Proxy.newProxyInterface would require casting to NewInvocationHandler. I also need to be careful when using the invoker and not call it with a non-default method.

Yes it requires casting to `NewInvocationHandler` or  assign the lambda in a local variable.

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

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


More information about the core-libs-dev mailing list