[Nestmates] Updates to the java.lang.Class docs in relation to nests

2018-06-19 Thread David Holmes
Following some extensive discussion on the JEP-181 CSR, Alex proposed a number of changes to the way we described nests and the new nest related methods in java.lang.Class. There is no normative change to the new reflection API that was added, just a change in how things are presented and

Re: [Nestmates] Minor updates and clarifications to the Reflection API specification

2018-05-23 Thread David Holmes
. thanks, Karen On May 22, 2018, at 8:08 PM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: Code review found some minor issues that needed attention. Please advise if there are any concerns with these changes. Thanks, David Full specs: http://cr.open

[Nestmates] Minor updates and clarifications to the Reflection API specification

2018-05-22 Thread David Holmes
Code review found some minor issues that needed attention. Please advise if there are any concerns with these changes. Thanks, David Full specs: http://cr.openjdk.java.net/~dholmes/8010319-JEP181/specs java.lang.Class::getNestHost()

JEP-181 Nest-based Access Control is out for review

2018-05-14 Thread David Holmes
I'm pleased to announce that the implementation of JEP-181 has now gone out for community review with the intent it be targeted to, and integrated into JDK 11 - hopefully by the end of this month. (Those processes still have to follow their natural course ...) My thanks and appreciation to

Re: API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

2018-02-16 Thread David Holmes
/invoke/MethodHandles.Lookup.html http://cr.openjdk.java.net/~dholmes/8010319/specs/java.lang.reflect/java/lang/reflect/AccessibleObject.html http://cr.openjdk.java.net/~dholmes/8010319/specs/java.lang.reflect/java/lang/reflect/Method.html David On 16/02/2018 7:20 PM, David Holmes wrote: Hi Karen

Re: API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

2018-02-16 Thread David Holmes
tation as is, with the explicit changes to access checking modified below for private members accessible to nestmates. thanks David! Karen On Feb 14, 2018, at 8:36 PM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: Hi Karen, Thanks for looking at this. On

Re: API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

2018-02-14 Thread David Holmes
Hi Karen, Thanks for looking at this. On 15/02/2018 1:16 AM, Karen Kinnear wrote: David, Re-reading these I had one suggestion: - java/lang/invoke/MethodHandles.java * - * In some cases, access between nested classes is obtained by the Java compiler by creating - * an

Re: API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

2018-02-12 Thread David Holmes
On 13/02/2018 12:51 PM, David Holmes wrote: On 13/02/2018 12:39 PM, Paul Sandoz wrote: On Feb 12, 2018, at 6:24 PM, David Holmes <david.hol...@oracle.com> wrote: On 13/02/2018 11:45 AM, Paul Sandoz wrote: On Feb 12, 2018, at 1:55 PM, David Holmes <david.hol...@oracle.co

[Nestmates] Spec updates to JVM TI, JDWP, JDI and java.lang.instrument for Class redefinition/retransformation

2018-02-07 Thread David Holmes
webrev: http://cr.openjdk.java.net/~dholmes/8191118/webrev/ I tried to produce specdiffs but specdiff seems broken. The links below at least highlight the changed text but you can't navigate directly to it. For java.lang.instrument the only change is in Instrumentation.java as per the

Re: API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

2018-01-30 Thread David Holmes
Hi Paul, On 31/01/2018 12:24 PM, Paul Sandoz wrote: On Jan 30, 2018, at 1:55 AM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: MethodHandle API Changes: - java/lang/invoke/MethodHandle.java * A non-virtual method handle to a specific vi

API Updates: 8191116: [Nestmates] Update core reflection, MethodHandle and varhandle APIs to allow for nestmate access

2018-01-30 Thread David Holmes
I've gone through the API specifications for core reflection, MethodHandles and VarHandles to see what changes are needed to accommodate nestmates and the related invocation rule changes. Turns out there is very little needed and most of what there is is non-normative, just correcting or

API Update: 8193408: [Nestmates] Update Class.getNestMembers to allow for duplicates

2018-01-24 Thread David Holmes
webrev: http://cr.openjdk.java.net/~dholmes/8193408/webrev/src/java.base/share/classes/java/lang/Class.java.cdiff.html (and inlined below) Further to earlier discussions: http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/2017-December/000464.html This is the proposed minor update

Re: Nestmates JVMS changes to selection and behavior implications

2017-12-20 Thread David Holmes
For the benefit of those on the observer list Karen sent an attachment which has been stripped. David On 21/12/2017 1:45 AM, Karen Kinnear wrote: David Holmes and I were studying the JVMS changes for nestmates - in particular the selection and preparation changes which are designed to make

Re: JLS spec changes for nestmates

2017-12-19 Thread David Holmes
On 19/12/2017 6:53 AM, Dan Smith wrote: On Dec 17, 2017, at 6:15 PM, David Holmes <david.hol...@oracle.com> wrote: I looked over 13.1, and think it does a fine job of allowing binaries to use the NestHost and NestMembers attributes without any changes (see items 9 and 10 in the secon

Re: Final nestmates spec

2017-12-18 Thread David Holmes
On 19/12/2017 9:01 AM, Dan Smith wrote: On Dec 18, 2017, at 3:03 PM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: On 19/12/2017 7:28 AM, Dan Smith wrote: But letting things "show through" is, I think, never what the end user will w

Re: Final nestmates spec

2017-12-18 Thread David Holmes
On 19/12/2017 7:28 AM, Dan Smith wrote: On Dec 15, 2017, at 9:41 PM, David Holmes <david.hol...@oracle.com> wrote: A good litmus test: should the result contain the current class or not? If it does, you're giving clients a polished list of actual nest members. If it does not, you'r

Re: Final nestmates spec

2017-12-14 Thread David Holmes
On 15/12/2017 1:53 PM, John Rose wrote: On Dec 14, 2017, at 6:50 PM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: If we encounter nestmate attributes in a classfile with a version that pre-dates the Nestmate release, do we ignore the

Re: Final nestmates spec

2017-12-11 Thread David Holmes
Hi Dan, I have one query with regards to the processing of the NestMembers attribute. Originally when I wrote the draft I copied the InnerClasses text and that included prohibiting duplicate entries in NestMembers. You dropped that restriction from the spec (though I haven't yet removed it

Re: [Nestmates] Draft core reflection API

2017-11-09 Thread David Holmes
Thanks John! David On 9/11/2017 6:08 PM, John Rose wrote: On Nov 8, 2017, at 11:25 PM, David Holmes <david.hol...@oracle.com> wrote: http://cr.openjdk.java.net/~dholmes/8188075/webrev/raw_files/new/java/lang/Class.html#getNestHost() I hope it isn't TMI for John. Looks good to

Re: [Nestmates] Draft core reflection API

2017-11-09 Thread David Holmes
host. _ Every class and interface is a member of exactly one nest. _ " Thanks, David Sent from my iPad On Nov 9, 2017, at 8:25 AM, David Holmes <david.hol...@oracle.com> wrote: On 7/11/2017 10:25 PM, Brian Goetz wrote: That's a good description of what a nest mate is. Wha

Re: [Nestmates] Draft core reflection API

2017-11-08 Thread David Holmes
commentary (apiNote) in getNestHost(). Thanks, David Sent from my MacBook Wheel On Nov 7, 2017, at 11:31 AM, David Holmes <david.hol...@oracle.com> wrote: Hi Brian, Thanks for the prompt review! On 7/11/2017 6:41 PM, Brian Goetz wrote: The specs are fine. But a reader who doesn't kno

Re: [Nestmates] Draft core reflection API

2017-11-08 Thread David Holmes
Thanks for the review Remi. David On 9/11/2017 6:47 AM, Remi Forax wrote: Apart for the corrections already mentioned, this is perfect. Rémi - Mail original - De: "David Holmes" <david.hol...@oracle.com> À: "valhalla-spec-experts" <valhalla-spec-exp

Re: [Nestmates] Draft core reflection API

2017-11-07 Thread David Holmes
On 8/11/2017 10:27 AM, John Rose wrote: On Nov 7, 2017, at 2:31 AM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: a top-level class is always a nest host The ad hoc explanation you suggest is OK with me but this last statement is TMI.  There's

Re: [Nestmates] Draft core reflection API

2017-11-07 Thread David Holmes
On 8/11/2017 10:24 AM, John Rose wrote: On Nov 6, 2017, at 11:26 PM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: For comment: http://cr.openjdk.java.net/~dholmes/8188075/webrev/raw_files/new/java/lang/Class.html#getNestHost() Looks good.  

Re: [Nestmates] Draft core reflection API

2017-11-07 Thread David Holmes
ot;. http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/2017-October/000386.html John prefers to minimize exceptions for the Java API. :) The other operations are not directly defined by JVMS and so have more flexibility to decide for themselves what is sensible behavior. On Nov 7, 2017, at 3:31

Re: [Nestmates] Draft core reflection API

2017-11-07 Thread David Holmes
my MacBook Wheel On Nov 7, 2017, at 7:26 AM, David Holmes <david.hol...@oracle.com> wrote: For comment: http://cr.openjdk.java.net/~dholmes/8188075/webrev/raw_files/new/java/lang/Class.html#getNestHost() Three functions added: - getNestHost - isNestmateOf - getNestMembers The first

[Nestmates] Draft core reflection API

2017-11-06 Thread David Holmes
For comment: http://cr.openjdk.java.net/~dholmes/8188075/webrev/raw_files/new/java/lang/Class.html#getNestHost() Three functions added: - getNestHost - isNestmateOf - getNestMembers The first two never throw exceptions related to nest hosts or nest membership. The third does. Thanks, David

Re: Valhalla EG minutes October 25, 2017

2017-11-01 Thread David Holmes
On 2/11/2017 1:01 AM, Karen Kinnear wrote: IV Nestmates: summary of spec issues: 1. Reflection APIs - being discussed in an email with David Holmes 2. additional exception information - David Holmes proposed adding a cause to IllegalAccessError, e.g. as a way to report class not found

Re: nestmates spec open issues

2017-10-30 Thread David Holmes
Hi John, On 26/10/2017 2:03 PM, John Rose wrote: On Oct 25, 2017, at 8:54 PM, David Holmes <david.hol...@oracle.com> wrote: Though I still feel uncomfortable lying about the nest-host. I don't see what usecases would be served by doing that. Other than informational uses, I can'

Re: nestmates spec open issues

2017-10-26 Thread David Holmes
On 27/10/2017 12:02 PM, John Rose wrote: On Oct 25, 2017, at 11:11 PM, David Holmes <david.hol...@oracle.com <mailto:david.hol...@oracle.com>> wrote: Please don't throw IAE that case.  I don't want to bikeshed exception types, but I think we have a strong precedent for usi

Re: nestmates spec open issues

2017-10-25 Thread David Holmes
On 26/10/2017 1:11 PM, John Rose wrote: On Oct 25, 2017, at 8:07 PM, John Rose wrote: On Oct 25, 2017, at 3:33 PM, Remi Forax > wrote: getClasses() throws an exception but getAnnotations() skips unavailable annotations.

Re: nestmates spec open issues

2017-10-25 Thread David Holmes
On 26/10/2017 2:51 AM, John Rose wrote: On Oct 25, 2017, at 8:39 AM, Brian Goetz wrote: John Rose proposed: a) Class.getnestHost() - defaults to itself if there is a resolution error (or if there is no Nest attribute) (yes) b) Class.getNestMembers() - returns

Re: Draft JVMS changes for Nestmates

2017-04-19 Thread David Holmes
On 20/04/2017 12:12 AM, Brian Goetz wrote: Yep. Also, multiple classes can claim the same nest member class in their NestMembers attributes. Not a problem as long as the MemberOfNest attribute (if any) of the member class points to a host class that claims it. At the risk of bikeshedding, I