Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-15 Thread Mandy Chung
On 11/15/19 1:32 AM, Peter Levart wrote: Hi Mandy, http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.03/ In Lookup's findBoundCallerClass and checkSecurityManager the javadoc is still talking about private access only although the checks are now made against full privilege access.

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-15 Thread Peter Levart
Hi Mandy, http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.03/ In Lookup's findBoundCallerClass and checkSecurityManager the javadoc is still talking about private access only although the checks are now made against full privilege access. Some possible nano optimization /

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-14 Thread Mandy Chung
On 11/14/19 5:04 PM, David Holmes wrote: Hi Mandy, On 15/11/2019 10:51 am, Mandy Chung wrote: On 11/14/19 8:04 AM, Mandy Chung wrote: On 11/14/19 2:33 AM, Alan Bateman wrote: On 14/11/2019 04:57, Mandy Chung wrote: Updated in place:

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-14 Thread David Holmes
Hi Mandy, On 15/11/2019 10:51 am, Mandy Chung wrote: On 11/14/19 8:04 AM, Mandy Chung wrote: On 11/14/19 2:33 AM, Alan Bateman wrote: On 14/11/2019 04:57, Mandy Chung wrote: Updated in place: http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.02/

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-14 Thread Mandy Chung
On 11/14/19 8:04 AM, Mandy Chung wrote: On 11/14/19 2:33 AM, Alan Bateman wrote: On 14/11/2019 04:57, Mandy Chung wrote: Updated in place: http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.02/ http://cr.openjdk.java.net/~mchung/jdk14/8233527/specdiff/ The addition of

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-14 Thread Mandy Chung
On 11/14/19 2:33 AM, Alan Bateman wrote: On 14/11/2019 04:57, Mandy Chung wrote: Updated in place: http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.02/ http://cr.openjdk.java.net/~mchung/jdk14/8233527/specdiff/ The addition of hasFullPrivilegeAccess looks okay and probably the

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-14 Thread Alan Bateman
On 14/11/2019 04:57, Mandy Chung wrote: Updated in place: http://cr.openjdk.java.net/~mchung/jdk14/8233527/webrev.02/ http://cr.openjdk.java.net/~mchung/jdk14/8233527/specdiff/ The addition of hasFullPrivilegeAccess looks okay and probably the right thing to do. For the @deprecated message

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-13 Thread Mandy Chung
On 11/13/19 11:45 AM, Johannes Kuhn wrote: The two bullets about the caller lookup object must have MODULE and PRIVATE are important explanation for it to require such access. Maybe I can add a bullet to say "The caller lookup object must have full privilege access" and then move those two

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-13 Thread Mandy Chung
On 11/13/19 11:45 AM, Johannes Kuhn wrote: This is a good idea, because full privilege access is a new concept, and should be mentioned at the places where it is used. To clarify, "full privilege access" (aka "full power") is not really a new concept. Module access was introduced in

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-13 Thread Johannes Kuhn
On 13.11.2019 20:07, Mandy Chung wrote: Thank you for all those changes. It fixed two of my reported bugs (JDK-8209005, JDK-8209078). Thanks for filing these good reports.   JDK-8173978 resolved the issues reported by JDK-8209005 and JDK-8209078. I'm happy I could help. It also makes my

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-13 Thread Mandy Chung
On 11/13/19 6:10 AM, Johannes Kuhn wrote: On 11.11.2019 22:23, Mandy Chung wrote: This is a follow-up of JDK-8226916. Lookup::hasPrivateAccess intends to test if this lookup is a full-power lookup; that is created by the original caller class calling MethodHandles::lookup. The current

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-13 Thread Johannes Kuhn
On 11.11.2019 22:23, Mandy Chung wrote: This is a follow-up of JDK-8226916. Lookup::hasPrivateAccess intends to test if this lookup is a full-power lookup; that is created by the original caller class calling MethodHandles::lookup. The current specification for Lookup::hasPrivateAccess returns

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-12 Thread Mandy Chung
John suggests to deprecate Lookup::hasPrivateAccess and introduce a correctly named method `hasFullPrivilegeAccess`.    Also clarify `Lookup::findClass` javadoc that it's equivalent to `ldc` instruction. Here is the updated webrev and specdiff:

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-12 Thread Mandy Chung
On 11/12/19 4:56 AM, Alan Bateman wrote: On 11/11/2019 21:23, Mandy Chung wrote: This is a follow-up of JDK-8226916. Lookup::hasPrivateAccess intends to test if this lookup is a full-power lookup; that is created by the original caller class calling MethodHandles::lookup. The current

Re: RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-12 Thread Alan Bateman
On 11/11/2019 21:23, Mandy Chung wrote: This is a follow-up of JDK-8226916. Lookup::hasPrivateAccess intends to test if this lookup is a full-power lookup; that is created by the original caller class calling MethodHandles::lookup. The current specification for Lookup::hasPrivateAccess returns

RFR JDK-8233527: Update Lookup::hasPrivateAccess and Lookup::defineClass spec w.r.t. full power lookup

2019-11-11 Thread Mandy Chung
This is a follow-up of JDK-8226916. Lookup::hasPrivateAccess intends to test if this lookup is a full-power lookup; that is created by the original caller class calling MethodHandles::lookup. The current specification for Lookup::hasPrivateAccess returns true if the lookup modes contain