Ok, not a bug. Thanks for the laughs though Chen lol. On Mon, Nov 17, 2025 at 10:47 PM David Alayachew <[email protected]> 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 <[email protected]> > 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 <[email protected]> on behalf of David >> Alayachew <[email protected]> >> *Sent:* Monday, November 17, 2025 9:25 PM >> *To:* [email protected] <[email protected]> >> *Subject:* Bug -- Nested Class box doesn't look like it belongs >> >> Hello @[email protected] <[email protected]>, >> >> 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 >> >
