devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

Anchor links to methods with generic parameters broken on OpenJDK 8/11

Open Nicolapps opened this issue 2 years ago • 1 comments

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 the add method visible.
  • Actual: the List<E> documentation page opens, but we see the top of the page and need to scroll manually to the add method.

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.

Nicolapps avatar Nov 14 '22 21:11 Nicolapps

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-

mikehaertl avatar Feb 22 '23 11:02 mikehaertl