RFR: JDK-8200337: Generalize see and link tags for user-defined anchors [v6]
Hannes Wallnöfer
hannesw at openjdk.org
Mon Oct 31 09:40:28 UTC 2022
On Sat, 29 Oct 2022 00:21:29 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> Hannes Wallnöfer has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Add reference parsing modes and doctree tests
>
> test/langtools/jdk/javadoc/doclet/testSeeLinkAnchor/TestSeeLinkAnchor.java line 114:
>
>> 112: checkOrder("m1/module-summary.html",
>> 113: """
>> 114: <a href="../m2/com/m2/Class2.html#main-heading"><code>See main heading in Class2</code></a>""");
>
> It seems like an anti-pattern to check the order of a single item!
> Is this as intended? Other examples, below, provide pairs.
Admittedly it was not a conscious choice to use `checkOrder` here, but I don't think it is an anti-pattern. Using `checkOrder` for a single string adds no overhead compared to `checkOutput`, and If we ever add additional string I think it is ok to do an ordered check by default.
-------------
PR: https://git.openjdk.org/jdk/pull/10395
More information about the compiler-dev
mailing list