Integrated: JDK-8265042: javadoc HTML files not generated for types nested in records
Jonathan Gibbons
jjg at openjdk.java.net
Fri May 7 14:54:10 UTC 2021
On Fri, 30 Apr 2021 16:39:14 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
> This addresses an oversight in the support for records.
>
> The fix could have been as simple as a one-word addition to a list of element kinds to check for nested classes. However, instead of that, the fix is more of a cleanup of a group of methods in `Utils` to fix this issue and to reduce the likelihood of anything similar happening again, when the next new kind of class is added.
>
> The cleanup uses new code idioms using lambdas, predicates, and generic methods to replace varargs and temporary sets and copying lists. The naming is somewhat cleaned up as well, but it was a self-imposed restriction that the cleanup is limited to the `Utils` class, and does not leak into clients of the class.
>
> There is a core `getItems` method which is somewhat multi-purpose, supporting recursive and non-recursive use, and examining either just documented members or all members, including members that are not directly documented. (The latter occurs mostly in serialization.) It is possible there is a future refactoring to further improve this method, perhaps to break it into different methods. With that in mind, the signature of some methods was narrowed from accepting any `Element` to a specific kind of element: generally, one of `PackageElement` or `TypeElement`.
>
> A new test is provided that checks that all the expected files are generated for various kinds of nested classes and interfaces in all kinds of classes and interfaces. The test is designed to fail if a new kind of class or interface is added in future without a corresponding update to the test.
This pull request has now been integrated.
Changeset: 947d69df
Author: Jonathan Gibbons <jjg at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/947d69df045fa97f56f4eeb5de7f338e169441fc
Stats: 490 lines in 2 files changed: 270 ins; 105 del; 115 mod
8265042: javadoc HTML files not generated for types nested in records
Reviewed-by: hannesw
-------------
PR: https://git.openjdk.java.net/jdk/pull/3821
More information about the javadoc-dev
mailing list