On Mon, 19 Aug 2024 14:39:36 GMT, Hannes Wallnöfer <hann...@openjdk.org> wrote:
> Please review a patch to suppress the `PREVIEW` and `RESTRICTED` superscript > labels for JavaDoc tags that generate plain links such as `{@linkplain ...}`. > The rationale is that the purpose of plain links is usually to have the label > not "stick out" of the local context, which makes the superscript label look > odd. > > The fix itself consists of a single line in `LinkTaglet.java`. The major part > of the changed lines is to clean up the generation of `PREVIEW` and > `RESTRICTED` labels in `HtmlLinkFactory.java`, which I have wanted to do for > a long time. Instead of generating internal and external links and plain-text > labels in separate code, I have moved the code to a common method that will > generate the appropriate link or label. It is a bit of a code smell that the > `getSuperscript` method uses nullness of parameters to decide which link > format to use, but I didn't know any reasonably simple better way to do this. > I did add proper doc comments to explain what is returned even though the > code is private. This pull request has now been integrated. Changeset: 55851a31 Author: Hannes Wallnöfer <hann...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/55851a312baaea5af14c04fb1b436313fe0deac7 Stats: 104 lines in 4 files changed: 62 ins; 31 del; 11 mod 8281533: Odd "preview" label in link/linkplain Reviewed-by: jjg ------------- PR: https://git.openjdk.org/jdk/pull/20626