Proposal: java.lang.reflect.Proxy and default methods
Remi Forax
forax at univ-mlv.fr
Fri Mar 3 06:58:29 UTC 2017
Alan,
i think we should update the doc section of j.l.r.Proxy to add a sentence about default methods ?
Rémi
----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "mp911de" <mpaluch at paluch.biz>, core-libs-dev at openjdk.java.net
> Envoyé: Jeudi 2 Mars 2017 09:28:35
> Objet: Re: Proposal: java.lang.reflect.Proxy and default methods
> On 01/03/2017 21:14, mp911de wrote:
>
>> Is there any progress on this issue? In the light of Java 9, the workaround
>> with
>> MethodHandles.lookup()/unreflectSpecial does not work anymore because
>> MethodHandles is encapsulated and calling setAccessible(true) on the
>> constructor fails.
>>
>> Resolving method handles inside the same module seems to work with public
>> lookup,
>> but as soon as a module defines an interface with default methods and this
>> interface is called by a proxy handler that comes from a different module,
>> it's
>> no longer possible to resolve the MethodHandle.
>>
>> Is this the appropriate mailing list for this case?
>>
> I assume you are looking for the "Non-abstract methods in interfaces"
> section in JEP 274 [1]. See also John Rose's note to jigsaw-dev about
> using Lookup.findSpecial to access default methods in interfaces [2].
>
> -Alan
>
> [1] http://openjdk.java.net/jeps/274
> [2]
> http://mail.openjdk.java.net/pipermail/jigsaw-dev/2017-January/010741.html
More information about the core-libs-dev
mailing list