Bug -- Nested Class box doesn't look like it belongs

David Alayachew davidalayachew at gmail.com
Tue Nov 18 04:02:39 UTC 2025


Ok, not a bug. Thanks for the laughs though Chen lol.

On Mon, Nov 17, 2025 at 10:47 PM David Alayachew <davidalayachew at gmail.com>
wrote:

> Hah!
>
> And JShell confirms you are right! The following is valid code!
>
> jshell> Gatherer.Integrator.Greedy.Greedy.Greedy.Greedy.Greedy.class
> $2 ==> interface java.util.stream.Gatherer$Integrator$Greedy
>
> On Mon, Nov 17, 2025 at 10:34 PM Chen Liang <chen.l.liang at oracle.com>
> wrote:
>
>> Hi David, I believe this is intentional - Greedy has itself inherited as
>> an accessible nested class, because Greedy inherits itself from Integrator.
>>
>> Try using this class literal in JShell:
>>
>> Gatherer.Integrator.Greedy.Greedy.class
>>
>> You will find this resolves to the Gatherer.Integrator.Greedy class. So I
>> believe javadoc is correct as it reflects actual language behavior.
>>
>> The behavior is similar for other nested interfaces which extend their
>> enclosing interface, such as PrimitiveIterator.OfInt.
>>
>> Regards,
>> Chen
>> ------------------------------
>> *From:* javadoc-dev <javadoc-dev-retn at openjdk.org> on behalf of David
>> Alayachew <davidalayachew at gmail.com>
>> *Sent:* Monday, November 17, 2025 9:25 PM
>> *To:* javadoc-dev at openjdk.org <javadoc-dev at openjdk.org>
>> *Subject:* Bug -- Nested Class box doesn't look like it belongs
>>
>> Hello @javadoc-dev at openjdk.org <javadoc-dev at openjdk.org>,
>>
>> Please look at the following Javadoc. Compare the "Nested Class Summary"
>> sections between them.
>>
>>
>> https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Gatherer.Integrator.html
>>
>>
>> https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/stream/Gatherer.Integrator.Greedy.html
>>
>> There should not be a box for nested class summary for the Greedy one,
>> right? That looks wrong, especially when compared to Integrator.
>>
>> And I think it is Javadoc's fault because there is nothing I can see in
>> the source code that would trigger this behaviour.
>>
>> Am I mistaken?
>>
>> Thank you for your time and consideration.
>> David Alayachew
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/javadoc-dev/attachments/20251117/37860a35/attachment.htm>


More information about the javadoc-dev mailing list