RFR: JDK-8288699: cleanup HTML tree in HtmlDocletWriter.commentTagsToContent [v2]

Jonathan Gibbons jjg at openjdk.org
Thu Jul 7 22:32:47 UTC 2022

On Tue, 28 Jun 2022 16:11:10 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

>> Jonathan Gibbons has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>>  - Add missing resource and example of use
>>    Fix Text and TextBuilder for Windows newlines
>>  - Merge remote-tracking branch 'upstream/master' into 8288699.commentTagsToContent
>>  - JDK-8288699: cleanup HTML tree in HtmlDocletWriter.commentTagsToContent
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java line 1555:
>> 1553:                             pendingDocRoot.accept(this, content);
>> 1554:                             pendingDocRoot = null;
>> 1555:                             first = false;
> first is already false here and a few lines above since pendingDocRoot assignment below is followed by a `first = false` assignment.

Yes, I think I agree. `first` is only used if the first child of the attribute value is text, in which case we call `redirectRelativeLinks`.

`pendingDocRoot` is a separate flag for saying we have encountered but not yet fully processed `{@docRoot}` until we can see if it is followed by `/..`


PR: https://git.openjdk.org/jdk/pull/9210

More information about the compiler-dev mailing list