nestmates spec open issues
Remi Forax
forax at univ-mlv.fr
Wed Oct 25 22:33:45 UTC 2017
getClasses() throws an exception but getAnnotations() skips unavailable annotations.
that said, i'm not against throwing in this case.
Rémi
----- Mail original -----
> De: "David Holmes" <david.holmes at oracle.com>
> À: "Valhalla Expert Group Observers" <valhalla-spec-observers at openjdk.java.net>, "John Rose" <john.r.rose at oracle.com>,
> "Brian Goetz" <Brian.Goetz at oracle.com>
> Cc: "valhalla-spec-experts" <valhalla-spec-experts at openjdk.java.net>
> Envoyé: Mercredi 25 Octobre 2017 23:52:31
> Objet: Re: nestmates spec open issues
> On 26/10/2017 2:51 AM, John Rose wrote:
>> On Oct 25, 2017, at 8:39 AM, Brian Goetz <Brian.Goetz at Oracle.COM> 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 full nest, fallback of self if any
>>>> resolution errors including it lists a nestHost that
>>>> does not list it.
>>>
>>> For consistency with the classfile representation, this should probably omit the
>>> host class.
>>
>> (yes, that's my preference, although the other way is not too terrible)
>>
>>>
>>>> [editor notes:
>>>> - full statically defined nest from classfile attribute? As distinct from full
>>>> dynamically
>>>> currently loaded nest - right?
>>>
>>> I would prefer that this return only the static members, which is consistent
>>> with the design center for reflection -- reflection over classfiles.
>>
>> yes yes yes; the reflection should reflect what's in the class-file (or a
>> resolvable subset), not everything in the VM's knowledge
>>
>> I like Remi's idea of scrubbing the list (of reflected nestmates) of bad actors
>> rather than clearing the list if there are *any* bad actors.
>>
>> Reminder: bad actors are an edge case, not a normal case.
>> Question: what do we do in the exactly parallel case for getInnerClasses? Do
>> we scrub bad actors? Nullify the result? Throw? (Probably throw.)
>
> Throw.
>
> David
>
>> — John
More information about the valhalla-spec-observers
mailing list