RFR: 8297437: javadoc cannot link to old docs (with old style anchors)
Hannes Wallnöfer
hannesw at openjdk.org
Tue Jan 24 15:29:16 UTC 2023
On Wed, 18 Jan 2023 09:45:44 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:
> As it discussed on the mail list, checking presence of "element-list" or "package-list" is good enough approach to determine which type of anchors is used in external docs. The fix is for docs generated by 'supported' platforms only, i.e. 8, 11, ...
>
> This fix extends `Extern.Item` with `useOldFormId` boolean flag to indicate a type of anchor. The boolean flag is set accordingly when reading a list of elements from either "element-list" or "package-list".
>
> Name transformation is performed in `Extern.getExternalLink()` by `getOldFormHtmlName()` call when creating `DocLink` instance.
>
> Type of anchors used by platform docs are hard-coded in `isOldFormPlatformDocs()` (similar to `getPlatformElementList()`), since it's not supposed to rebuild platform docs on docs.oracle.com.
This looks good to me. A few minor issues:
- The year in the copyright headers of modified files should be updated to 2023
- The bug id should be added to the @bug field of tests that have been significantly changed (I think only TestLinkPlatform.java in this case)
- I wonder if for those tests that are hard-coded to release 8 we should add tests for release >= 10?
-------------
Changes requested by hannesw (Reviewer).
PR: https://git.openjdk.org/jdk/pull/12066
More information about the javadoc-dev
mailing list