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

asf-gitbox-commits pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit b05e8580ae821a42c5e0c836b74b6649c9acc841
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Sat Oct 17 01:30:27 2026 +0200

    Upgrade from Java 11 to Java 12. The plan is to upgrade to a higher version,
    but this small step is done first for testing if there is any user reaction.
---
 README.md                                          |  2 +-
 endorsed/build.gradle.kts                          |  2 +-
 .../apache/sis/storage/geoheif/ImageResource.java  |  2 +-
 .../sis/storage/internal/InputStreamAdapter.java   |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK12.java     | 44 ----------------------
 .../main/org/apache/sis/pending/jdk/JDK13.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK15.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK16.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK17.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK18.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK19.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK20.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK21.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK22.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK23.java     |  2 +-
 .../main/org/apache/sis/pending/jdk/JDK26.java     |  2 +-
 .../org/apache/sis/pending/jdk/package-info.java   |  2 +-
 .../main/org/apache/sis/util/Classes.java          | 21 +----------
 optional/README.md                                 |  2 +-
 optional/src/org.apache.sis.gui/bundle/README      |  2 +-
 parent/overview.html                               |  2 +-
 parent/pom.xml                                     |  4 +-
 22 files changed, 23 insertions(+), 84 deletions(-)

diff --git a/README.md b/README.md
index c1df4f7f39..4b85c5ce08 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ project logo are trademarks of The Apache Software Foundation.
 
 ## Build from sources
 
-Running the library part of Apache SIS requires Java 11 or higher.
+Running the library part of Apache SIS requires Java 12 or higher.
 Running the JavaFX application part requires Java 22 or higher.
 Building SIS requires Java 22 or higher
 together with [Gradle](https://gradle.org/) 8 build system.
diff --git a/endorsed/build.gradle.kts b/endorsed/build.gradle.kts
index d2d53a4cd9..2785080913 100644
--- a/endorsed/build.gradle.kts
+++ b/endorsed/build.gradle.kts
@@ -101,7 +101,7 @@ dependencies {
 var srcDir = file("src")            // Must be the same as the hard-coded 
value in `BuildHelper.java`.
 tasks.compileJava {
     dependsOn(":geoapi:rebuild")
-    options.release.set(11)         // The version of both Java source code 
and compiled byte code.
+    options.release.set(12)         // The version of both Java source code 
and compiled byte code.
 }
 tasks.compileTestJava {
     options.compilerArgs.add("-source")         // "source", not "release", 
because we accept any target version.
diff --git 
a/endorsed/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/geoheif/ImageResource.java
 
b/endorsed/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/geoheif/ImageResource.java
index a431290c32..e7ba0e6c65 100644
--- 
a/endorsed/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/geoheif/ImageResource.java
+++ 
b/endorsed/src/org.apache.sis.storage.geoheif/main/org/apache/sis/storage/geoheif/ImageResource.java
@@ -377,7 +377,7 @@ final class ImageResource extends TiledGridCoverageResource 
implements StoreReso
          * <p><b>Note:</b> this is defined as an inner class of {@link 
TiledGridCoverage} subclass
          * because, at the time of writing this class, {@link AOI} is a 
protected class.</p>
          */
-        // TODO: make static when allowed to compile with JDK12 (exact version 
not verified).
+        // TODO: make static when allowed to compile with JDK13 (exact version 
not verified).
         final class ReadContext extends ByteRanges {
             /**
              * Iterator over the tiles to read.
diff --git 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/internal/InputStreamAdapter.java
 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/internal/InputStreamAdapter.java
index bff6009366..ad4fb6189d 100644
--- 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/internal/InputStreamAdapter.java
+++ 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/internal/InputStreamAdapter.java
@@ -169,7 +169,7 @@ public final class InputStreamAdapter extends InputStream 
implements Markable {
      * @param  count  number of bytes to skip.
      * @throws IOException if an I/O error occurs.
      */
-//  @Override       // Pending JDK12.
+    @Override
     public void skipNBytes(final long count) throws IOException {
         input.seek(Math.addExact(input.getStreamPosition(), count));
     }
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK12.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK12.java
deleted file mode 100644
index 680835fdec..0000000000
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK12.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sis.pending.jdk;
-
-
-/**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
- *
- * @author  Martin Desruisseaux (Geomatys)
- */
-public final class JDK12 {
-    /**
-     * Do not allow instantiation of this class.
-     */
-    private JDK12() {
-    }
-
-    public static String descriptorString(Class<?> c) {
-        if (c == Double.TYPE)    return "D";
-        if (c == Float.TYPE)     return "F";
-        if (c == Long.TYPE)      return "J";
-        if (c == Integer.TYPE)   return "I";
-        if (c == Short.TYPE)     return "S";
-        if (c == Byte.TYPE)      return "B";
-        if (c == Character.TYPE) return "C";
-        if (c == Boolean.TYPE)   return "Z";
-        if (c == Void.TYPE)      return "V";
-        return "L" + c.getCanonicalName() + ';';
-    }
-}
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK13.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK13.java
index 26365ef0fb..2db735633e 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK13.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK13.java
@@ -20,7 +20,7 @@ import java.nio.ByteBuffer;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK15.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK15.java
index 87fd71dc18..4e43ce78a9 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK15.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK15.java
@@ -18,7 +18,7 @@ package org.apache.sis.pending.jdk;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version11.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK16.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK16.java
index a8b1a165ec..ff5d798a57 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK16.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK16.java
@@ -23,7 +23,7 @@ import java.util.stream.Collectors;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK17.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK17.java
index e9cbb105c5..0ab2d064cb 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK17.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK17.java
@@ -21,7 +21,7 @@ import java.nio.charset.Charset;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK18.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK18.java
index 419bcc225f..eff8e34f4b 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK18.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK18.java
@@ -20,7 +20,7 @@ import java.time.Duration;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK19.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK19.java
index f492f4d064..7d87b66009 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK19.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK19.java
@@ -25,7 +25,7 @@ import static 
org.apache.sis.util.collection.Containers.hashMapCapacity;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK20.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK20.java
index 2142cc573a..e991283cf2 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK20.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK20.java
@@ -25,7 +25,7 @@ import java.nio.file.attribute.BasicFileAttributes;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK21.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK21.java
index c1a56e0023..84679443e4 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK21.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK21.java
@@ -26,7 +26,7 @@ import java.util.NoSuchElementException;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK22.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK22.java
index e7f2c31c5f..176fea69e6 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK22.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK22.java
@@ -21,7 +21,7 @@ import java.nio.file.Path;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK23.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK23.java
index a29acac022..85f237878e 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK23.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK23.java
@@ -21,7 +21,7 @@ import java.time.Instant;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK26.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK26.java
index c2f442f8be..f86c35bc26 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK26.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/JDK26.java
@@ -18,7 +18,7 @@ package org.apache.sis.pending.jdk;
 
 
 /**
- * Place holder for some functionalities defined in a JDK more recent than 
Java 11.
+ * Place holder for some functionalities defined in a JDK more recent than the 
targeted version.
  *
  * @author  Martin Desruisseaux (Geomatys)
  */
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/package-info.java
 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/package-info.java
index 09b228087e..e83169da04 100644
--- 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/package-info.java
+++ 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/pending/jdk/package-info.java
@@ -16,7 +16,7 @@
  */
 
 /**
- * Place-holder for classes that do not exist in JDK 11.
+ * Place-holder for classes that do not exist in targeted Java version.
  *
  * <STRONG>Do not use!</STRONG>
  *
diff --git 
a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/Classes.java 
b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/Classes.java
index 6ae22a43c5..ac99f02986 100644
--- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/Classes.java
+++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/util/Classes.java
@@ -34,7 +34,6 @@ import java.lang.reflect.GenericDeclaration;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Modifier;
 import org.opengis.annotation.UML;
-import org.apache.sis.pending.jdk.JDK12;
 
 
 /**
@@ -55,7 +54,7 @@ import org.apache.sis.pending.jdk.JDK12;
  * </ul>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 1.7
+ * @version 1.8
  * @since   0.3
  */
 public final class Classes {
@@ -116,24 +115,8 @@ public final class Classes {
                 do element = element.getComponentType();
                 while (element!=null && ++change != 0);
             } else if (element != Void.TYPE) {
-                // TODO: use Class.arrayType() with JDK12.
-                final var buffer = new StringBuilder();
-                do buffer.insert(0, '[');
+                do element = element.arrayType();
                 while (--change != 0);
-                if (element.isPrimitive()) {
-                    buffer.append(JDK12.descriptorString(element));
-                } else if (element.isArray()) {
-                    buffer.append(element.getName());
-                } else {
-                    buffer.append('L').append(element.getName()).append(';');
-                }
-                final String name = buffer.toString();
-                try {
-                    element = Class.forName(name);
-                } catch (ClassNotFoundException e) {
-                    throw new TypeNotPresentException(name, e);
-                    // Should never happen because we are creating an array of 
an existing class.
-                }
             }
         }
         return element;
diff --git a/optional/README.md b/optional/README.md
index 32cccd5bf5..a28046e530 100644
--- a/optional/README.md
+++ b/optional/README.md
@@ -8,7 +8,7 @@ If those dependencies are not provided, Apache SIS 
[endorsed](../endorsed)
 modules will still work but without Graphical User Interface (GUI).
 
 GDAL is temporarily provided as an optional module despite its permissive 
license
-because it requires Java 22, while the main Apache SIS modules target Java 11.
+because it requires Java 22, while the main Apache SIS modules target Java 12.
 
 ## Configuration
 
diff --git a/optional/src/org.apache.sis.gui/bundle/README 
b/optional/src/org.apache.sis.gui/bundle/README
index a5fc2aab27..b088dbb0c1 100644
--- a/optional/src/org.apache.sis.gui/bundle/README
+++ b/optional/src/org.apache.sis.gui/bundle/README
@@ -14,7 +14,7 @@ Installation
 ============
 
 For developing applications using the SIS library or for using on command-line,
-the only requirement is Java 11 or later, except the GDAL module which requires
+the only requirement is Java 12 or later, except the GDAL module which requires
 Java 22. For launching the desktop application, requirements are Java 22 or 
later
 and JavaFX 24 or later.
 
diff --git a/parent/overview.html b/parent/overview.html
index 0d97dabd0c..495ed4c0c7 100644
--- a/parent/overview.html
+++ b/parent/overview.html
@@ -28,7 +28,7 @@
     Overview of <a href="http://sis.apache.org";>Apache SIS™ (Spatial 
Information System)</a>.
 
     <h1>Requirements</h1>
-    <p>SIS requires Java 11 Standard Edition.</p>
+    <p>Apache <abbr>SIS</abbr> requires Java 12 Standard Edition.</p>
 
     <h1>Classes naming</h1>
     <p>Implementations of <a href="http://www.geoapi.org/";>GeoAPI 
interfaces</a> usually (but not always)
diff --git a/parent/pom.xml b/parent/pom.xml
index 21483755aa..f8cab48455 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -425,8 +425,8 @@
        =================================================================== -->
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <maven.compiler.source>11</maven.compiler.source>
-    <maven.compiler.target>11</maven.compiler.target>
+    <maven.compiler.source>12</maven.compiler.source>
+    <maven.compiler.target>12</maven.compiler.target>
   </properties>
 
 </project>

Reply via email to