RFR: 8210943: Hiding of inner classes not resolved properly
Sundararajan Athijegannathan
sundararajan.athijegannathan at oracle.com
Sat Dec 1 06:44:51 UTC 2018
That should have been "do I miss something here?" :)
-Sundar
On 01/12/18, 11:43 AM, Sundararajan Athijegannathan wrote:
> Class.getClasses() javadoc does not mention anything about order of
> classes returned.
>
> https://docs.oracle.com/javase/10/docs/api/java/lang/Class.html#getClasses()
>
>
> Do we need a check using Class.getDeclaringClass() or do I something
> here?
>
> Thanks,
> -Sundar
>
> On 30/11/18, 4:44 PM, Attila Szegedi wrote:
>> +1. Thanks for fixing this.
>>
>>> On 2018. Nov 29., at 18:01, Hannes
>>> Wallnöfer<hannes.wallnoefer at oracle.com> wrote:
>>>
>>> Please review:
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8210943
>>> Webrev: http://cr.openjdk.java.net/~hannesw/8210943/webrev.00/
>>>
>>> AccessibleMembersLookup#lookupAccessibleMembers adds all nested
>>> classes returned by Class.getClasses(), but these may contain
>>> inherited classes that are shadowed and thus not visible from the
>>> current class. The solution is to make sure we use the first inner
>>> class with any given name.
>>>
>>> Thanks,
>>> Hannes
More information about the nashorn-dev
mailing list