freeCodeCamp / freeCodeCamp/devdocs

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

Open
#1,868 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Ruby
Stars
39.5k
Forks
2.6k
Avg merge
4d 32m
Merged PRs (30d)
13

Description

# 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` documentation page opens, with the documentation for the `add` method visible.
* Actual: the `List` 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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the anchor behavior on the OpenJDK 8 and 11 documentation pages, then compare the generated method IDs with versions 17–19. Inspect the scraper output for List.add and verify that selecting the search result lands on the add method section rather than the top of the page.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.