On Oct 25, 2017, at 8:39 AM, Brian Goetz <brian.go...@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.)

— John

Reply via email to