Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MJAVADOC-796] Do not follow links for Java 12+ #287

Merged
merged 1 commit into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5727,13 +5727,17 @@ protected final OfflineLink getDefaultJavadocApiLink() {
}

/**
* Follows all of the given links, and returns their last redirect locations. Ordering is kept.
* This is necessary because javadoc tool doesn't follow links, see JDK-8190312 (MJAVADOC-427, MJAVADOC-487)
* Follows all of the given links if the Javadoc version is before 12, and returns their last
* redirect locations. Ordering is kept. This is necessary because javadoc tool doesn't follow
* links, see JDK-8190312 (MJAVADOC-427, MJAVADOC-487)
*
* @param links Links to follow.
* @return Last redirect location of all the links.
*/
private Set<String> followLinks(Set<String> links) {
if (javadocRuntimeVersion.isAtLeast("12")) {
return links;
}
Set<String> redirectLinks = new LinkedHashSet<>(links.size());
for (String link : links) {
try {
Expand Down