This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 785f5e0e27 Make JDK URL calculation JDK 8 compatible
     new 3414856d5b Merge pull request #5748 from matthiasblaesing/fix_jdk8
785f5e0e27 is described below

commit 785f5e0e27404b25b0f859a46ba2f0222d689e0f
Author: Matthias Bläsing <[email protected]>
AuthorDate: Thu Mar 30 22:22:27 2023 +0200

    Make JDK URL calculation JDK 8 compatible
---
 .../platformdefinition/J2SEPlatformDefaultJavadocImpl.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
 
b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
index 4800d3635e..30369b12da 100644
--- 
a/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
+++ 
b/java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/J2SEPlatformDefaultJavadocImpl.java
@@ -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
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to