Skip to content

Commit

Permalink
Merge pull request apache#5748 from matthiasblaesing/fix_jdk8
Browse files Browse the repository at this point in the history
Make JDK URL calculation JDK 8 compatible
  • Loading branch information
matthiasblaesing committed Mar 31, 2023
2 parents edb1d8e + 785f5e0 commit 3414856
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ public final class J2SEPlatformDefaultJavadocImpl implements J2SEPlatformDefault
LocalDate now = LocalDate.now();

if (now.isAfter(jdk9)) { // time traveler -> only java 8 doc for you
int[] jdk = new int[] {9};
jdk9.datesUntil(now, Period.ofMonths(6)).forEach((t) -> {
OFFICIAL_JAVADOC.put(String.valueOf(jdk[0]), "https://docs.oracle.com/javase/"+jdk[0]+"/docs/api/"); // NOI18N
jdk[0]++;
});
OFFICIAL_JAVADOC.put(String.valueOf(jdk[0]), "https://download.java.net/java/early_access/jdk"+jdk[0]+"/docs/api/"); // NOI18N Early access
int jdk = 9;
for (LocalDate t = jdk9; t.isBefore(now); t = t.plusMonths(6)) {
OFFICIAL_JAVADOC.put(String.valueOf(jdk), "https://docs.oracle.com/javase/" + jdk + "/docs/api/"); // NOI18N
jdk++;
}
OFFICIAL_JAVADOC.put(String.valueOf(jdk), "https://download.java.net/java/early_access/jdk" + jdk + "/docs/api/"); // NOI18N Early access
}
}

Expand Down

0 comments on commit 3414856

Please sign in to comment.