On Fri, 25 Feb 2022 00:36:21 GMT, Jonathan Gibbons <[email protected]> wrote:
>> Explorative refactoring performed while looking into multiple `@inheritDoc`
>> issues. The easiest way to review it is to, probably, go commit by commit;
>> they are quite focused and commented. Not only the branch as a whole, but
>> all the constituent commits should pass tests and leave JDK API
>> Documentation unchanged.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
> line 168:
>
>> 166: var typeElement = elementUtils.getTypeElement(s);
>> 167: return typeElement == null ? null : typeElement.asType();
>> 168: });
>
> had to think about this one, but I guess OK. The difference is that the old
> code never put `null` in the symtab; the new code does.
computeIfAbsent does not put null values into the map. This is guaranteed by
that method's specification. Did you mean something else?
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberTable.java
> line 529:
>
>> 527: Map<ExecutableElement, List<ExecutableElement>>
>> overriddenByTable = new HashMap<>();
>> 528: for (VisibleMemberTable pvmt : parents) {
>> 529: // Merge the lineage overrides into local table
>
> not sure what "lineage" means!
I guess the original author used that as a metaphor to denote a branch of
inheritance.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7233