yes :) Remi
On March 8, 2017 9:41:13 PM GMT+01:00, John Rose <john.r.r...@oracle.com> wrote: >On Mar 8, 2017, at 10:47 AM, Remi Forax <fo...@univ-mlv.fr> wrote: >> >> The exception if the lookup is PRIVATE should be >IllegalStateException and not UnuspportedOperationException. >> then, given that the loaded class will have the same protection >domain as the lookup class, i do not fully understand why having a >PRIVATE lookup is a problem. > >Since lookups are stateless, so there is never a reason for them to >throw ISE; thus UOE is better (loose analogy with immutable lists). > >We are disallowing PRIVATE in order to reserve it for future use. If >you define a class into a private context, the resulting class *should* >have private access to the lookup-class, but we currently cannot >express this in the JVM (except by hacks). Defining a new class with >private access to a lookup-class is the replacement we are planning for >the unsafe, undocumented notion of "host class". But first we need a >better treatment of what is "private access", which will be provided by >a future concept of "nestmate" (at the JVM level) which mirrors the >language-level permissions of nestmates. > >Make sense? > >— John -- Sent from my Android device with K-9 Mail. Please excuse my brevity.