RFR: JDK-8261079: Fix support for @hidden in classes and interfaces [v2]

Hannes Wallnöfer hannesw at openjdk.java.net
Thu Feb 11 11:06:04 UTC 2021


> This change improves support for the `@hidden` tag to suppress documentation for specific elements, especially in the context of classes, interfaces and inheritance/method overriding.
> 
> The important changes are in `Utils` and in `VisibleMemberTable`. (There is also a number of non-related small code cleanup changes, sorry about that, I know it makes review a bit harder but I couldn't resist.)
> 
> In `Utils` the most important change are:
> 
>  - Consider types as "undocumented enclosures" if they are marked with a `@hidden` tag
>  - Check for `@hidden` tags even in non-included elements as they may be included via undocumented enclosures
>  - To counter the above change, only run doclint on elements that are either included or contained in an included type, as we don't want to report warnings or errors for non-included code. 
>  
> In `VisibleMemberTable` there is a subtle change to not consider an overriding method as a "simple override" if the overridden method is hidden or otherwise invisible but in turn is a non-simple override of a method further up the inheritance chain. This resulted in methods which should have been documented as declared locally to be documented as declared in supertypes. I also did a bit of renaming in `VisibleMemberTable` to make the purpose of things a bit clearer.
> 
> Other than that, most of the changes consist of added calls to `utils.hasHiddenTag(Element)`, usually with the purpose of not generating links to things that are not there.

Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:

  JDK-8261079: Updates to review comments
   - Use separate unchecked/uncached code path when checking for @hidden tag on non-incuded elements
   - Rename OverridingMethodInfo to OverriddenMethodInfo to better reflect its purpose

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2406/files
  - new: https://git.openjdk.java.net/jdk/pull/2406/files/26ec60cd..cd194c6b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2406&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2406&range=00-01

  Stats: 49 lines in 2 files changed: 18 ins; 15 del; 16 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2406.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2406/head:pull/2406

PR: https://git.openjdk.java.net/jdk/pull/2406


More information about the javadoc-dev mailing list