On Mon, 12 Feb 2024 15:37:05 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:

> Please review a change to simplify generation of breadcrumb navigation links. 
> We previously used generic methods to generate the links which didn't allow 
> to tailor the links for our needs and was also more verbose. The change adds 
> a protected `getBreadcrumbLink` method to `HtmlDocletWriter` which makes the 
> link generation code much simpler.
> 
> I added a check to the existing `TestPreview` test to make sure no PREVIEW 
> links are generated for preview elements in the sub-navigation bar.

Marked as reviewed by jjg (Reviewer).

I like the new `getBreadcrumbLink` work.

test/langtools/jdk/javadoc/doclet/testPreview/TestPreview.java line 142:

> 140:                     """);
> 141: 
> 142:         // 8325325: Breadcrumb navigation links should not contain 
> PREVIEW link

The code is OK, but sometimes, when output should not contain something, it may 
be useful to have a broadly applicable "negative" call for `checkOutput`, as in 
`checkOutput(file, false, ...)`.   But agreed such checks can be fragile, and 
it is also good to have positive checks about what the output should be.

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

PR Review: https://git.openjdk.org/jdk/pull/17809#pullrequestreview-1876053054
PR Comment: https://git.openjdk.org/jdk/pull/17809#issuecomment-1939434730
PR Review Comment: https://git.openjdk.org/jdk/pull/17809#discussion_r1486683971

Reply via email to