Please review a change to make unqualified anchor references such as `{@link
##anchor link}` work everywhere. Previously, such links only worked in class
pages. The fix consists in attributing the correct Element in
`JavacTrees::attributeDocReference` for references declared in API elements,
and setting it to `null` for references defined in `doc-files` to make them
work as local links.
Because of unattributed `doc-files` references, we also have to exclude such
links from the reference check in DocLint. This is fine because local
references always have a target element, and we do not check the anchor anyway.
-------------
Commit messages:
- Make unqualified reference in legacy package.html work as package link
everywhere.
- Add tests and tweak details
- 8372055: Fragment link tag does not work in package info
Changes: https://git.openjdk.org/jdk/pull/28372/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28372&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8372055
Stats: 156 lines in 4 files changed: 135 ins; 0 del; 21 mod
Patch: https://git.openjdk.org/jdk/pull/28372.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28372/head:pull/28372
PR: https://git.openjdk.org/jdk/pull/28372