devdocs
devdocs copied to clipboard
Anchor links to methods with generic parameters broken on OpenJDK 8/11
Bug report
OS information
macOS 12.5.1 / Firefox 106
Steps to reproduce
- Open https://devdocs.io/openjdk~8/ or https://devdocs.io/openjdk~11/ (versions 17, 18 and 19 work correctly).
- Search for “List.add()” and select the first result.
- Expected: the
List<E>documentation page opens, with the documentation for theaddmethod visible. - Actual: the
List<E>documentation page opens, but we see the top of the page and need to scroll manually to theaddmethod.
Possible fix
It looks like id of the method section in the documentation page is add(java.lang.Object) instead of add(E). The scraper might need to be fixed.
Same here but with a slightly different looking link. If you search for Arrays.asList and the generated link points to:
https://devdocs.io/openjdk~8/java/util/arrays#asList-T...-
whereas the correct anchor would be:
https://devdocs.io/openjdk~8/java/util/arrays#asList-java.lang.Object:A-