On Jul 24, 2016, at 1:24 AM, Alan Bateman <alan.bate...@oracle.com> wrote: > > On 23/07/2016 00:12, John Rose wrote: > >> >> The Lookup API does not have a "setAccessible" analog. >> Maybe it should; along the lines of Unsafe.privateLookup(Class). >> > Would this be the internal Unsafe or sun.misc.Unsafe? I just wonder if this > is something that would be regretted in the future.
It has to be designed carefully. I've filed a public tracking bug, which folks can use as a point of reference. https://bugs.openjdk.java.net/browse/JDK-8162494 some frameworks need access delegation via MethodHandles.lookup The regrets come from two circumstances: Leaving the store open after hours, or requiring premium customers to break in the back door for legitimate purchases. > For the original issue then maybe we should look again at providing a way to > invoke a default method from a proxy's invocation handler. Peter Levart had a > reasonable proposal on that. It would of course require a lot of security > eyes to make sure that it is bullet proof. Yes, I've wandered pretty far away from that issue. (Changed the subject line!) — John