You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2022/12/10 16:24:07 UTC

[sis] branch geoapi-4.0 updated (2f0e340e1f -> 929bc5d9c1)

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

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


    from 2f0e340e1f Set version number and the EPSG geodetic dataset URL to expected values after release.
     new 123f05ebc0 Post-release cleanup.
     new 9bb1d80d20 Post-release: remove deprecated methods.
     new 0083d298c7 Set Java version requirement to Java 11 and update documentation. There is no code change in this commit.
     new a5835a6c1c Upgrade Derby dependency to series 10.15, which is the last series compatible with Java 11.
     new 3755cb816a Move JavaEE 8 dependency to `sis-webapp` module. Update links to Java 8 documentation. Update NetBeans project configuration.
     new ad687670cb Remove OSGi dependency from core SIS modules. OSGi support has never been completed anyway. The class moved to `sis-webapp` in case we want to try again in the future.
     new 036c9fb308 Remove a hack for a Java 8 limitation fixed in Java 9.
     new 929bc5d9c1 Delete some placeholder defined in the `JDK9` internal class, now replaced by their standard Java 11 counterparts.

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README                                             |   2 +-
 application/sis-console/pom.xml                    |   5 +
 application/sis-javafx/pom.xml                     |   5 +
 application/sis-javafx/src/main/artifact/README    |   6 +-
 application/sis-javafx/src/main/artifact/bin/sis   |   2 +-
 .../sis-javafx/src/main/artifact/bin/sis.bat       |   2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx |   2 +-
 .../sis-javafx/src/main/artifact/bin/sisfx.bat     |   2 +-
 .../apache/sis/gui/coverage/CoverageExplorer.java  |  19 +---
 .../org/apache/sis/gui/coverage/package-info.java  |   2 +-
 .../java/org/apache/sis/gui/map/StatusBar.java     |  63 +----------
 .../java/org/apache/sis/gui/map/package-info.java  |   2 +-
 .../gui/referencing/RecentReferenceSystems.java    |  20 +---
 .../apache/sis/gui/referencing/package-info.java   |   2 +-
 application/sis-openoffice/pom.xml                 |   5 +
 application/sis-webapp/pom.xml                     |  10 ++
 .../org/apache/sis/services}/OSGiActivator.java    |   7 +-
 .../org/apache/sis/services}/ServletListener.java  |   8 +-
 .../org/apache/sis/internal/book/Assembler.java    |  10 +-
 .../org/apache/sis/internal/book/package-info.java |   4 +-
 .../sis/coverage/grid/BufferedGridCoverage.java    |   3 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   |  27 +----
 .../org/apache/sis/coverage/grid/GridGeometry.java |  31 +-----
 .../org/apache/sis/coverage/grid/package-info.java |   2 +-
 .../org/apache/sis/feature/AbstractFeature.java    |   2 +-
 .../java/org/apache/sis/image/ImageCombiner.java   |   5 +-
 .../java/org/apache/sis/image/PlanarImage.java     |  15 +--
 .../main/java/org/apache/sis/image/TileCache.java  |   3 +-
 .../internal/coverage/j2d/ColorModelFactory.java   |  31 ++----
 .../sis/internal/coverage/j2d/ColorModelPatch.java | 121 ---------------------
 .../sis/internal/coverage/j2d/ImageUtilities.java  |   2 +-
 .../coverage/j2d/MultiBandsIndexColorModel.java    |  43 +++++++-
 .../sis/internal/coverage/j2d/package-info.java    |   2 +-
 .../sis/internal/feature/GeometryFactories.java    |   3 +-
 .../internal/processing/image/TiledProcess.java    |   3 +-
 .../org/apache/sis/feature/FeatureTestCase.java    |   6 +-
 core/sis-metadata/pom.xml                          |   5 +
 .../sis/internal/xml/StreamWriterDelegate.java     |   2 +-
 .../org/apache/sis/util/iso/DefaultTypeName.java   |  17 +--
 .../java/org/apache/sis/util/iso/package-info.java |   2 +-
 .../java/org/apache/sis/xml/MarshalContext.java    |   2 +-
 .../src/main/java/org/apache/sis/xml/XML.java      |  12 +-
 core/sis-referencing-by-identifiers/pom.xml        |   5 +
 .../gazetteer/MilitaryGridReferenceSystem.java     |   3 +-
 core/sis-referencing/pom.xml                       |   5 +
 .../sis/referencing/AbstractIdentifiedObject.java  |   2 +-
 .../main/java/org/apache/sis/referencing/CRS.java  |  20 +---
 .../org/apache/sis/referencing/datum/formulas.html |   2 +-
 .../transform/DefaultMathTransformFactory.java     |  42 +------
 .../referencing/operation/transform/formulas.html  |   2 +-
 .../operation/transform/package-info.java          |   2 +-
 .../org/apache/sis/referencing/package-info.java   |   2 +-
 .../provider/ParameterNameTableGenerator.java      |   3 +-
 .../sis/parameter/DefaultParameterValueTest.java   |   4 +-
 .../operation/transform/CoordinateDomain.java      |   2 +-
 core/sis-utility/pom.xml                           |  16 ---
 .../sis/internal/converter/SystemRegistry.java     |   7 +-
 .../sis/internal/converter/package-info.java       |   7 +-
 .../java/org/apache/sis/internal/jdk9/JDK9.java    | 110 +------------------
 .../org/apache/sis/internal/jdk9/package-info.java |   2 +-
 .../apache/sis/internal/system/SystemListener.java |   3 +-
 .../org/apache/sis/internal/util/Numerics.java     |   2 +-
 .../main/java/org/apache/sis/math/Fraction.java    |  13 +--
 .../java/org/apache/sis/math/MathFunctions.java    |   2 +-
 .../src/main/java/org/apache/sis/math/Vector.java  |   5 +-
 .../src/main/java/org/apache/sis/setup/About.java  |   3 +-
 .../java/org/apache/sis/setup/GeometryLibrary.java |   2 -
 .../main/java/org/apache/sis/setup/OptionKey.java  |   2 +-
 .../java/org/apache/sis/util/CharSequences.java    |   4 +-
 .../src/main/java/org/apache/sis/util/Locales.java |   2 +-
 .../sis/util/collection/BackingStoreException.java |   2 +-
 .../apache/sis/util/collection/IntegerList.java    |   6 +-
 .../java/org/apache/sis/util/logging/Logging.java  |   3 +-
 .../apache/sis/util/logging/PerformanceLevel.java  |   8 +-
 .../org/apache/sis/util/logging/package-info.java  |   2 +-
 .../org/apache/sis/test/ProjectDirectories.java    |   3 +-
 ide-project/NetBeans/nbproject/build-impl.xml      |  25 ++---
 ide-project/NetBeans/nbproject/genfiles.properties |   6 +-
 ide-project/NetBeans/nbproject/project.properties  |  17 ++-
 ide-project/NetBeans/nbproject/project.xml         |   1 -
 pom.xml                                            |  28 ++---
 src/main/javadoc/overview.html                     |   2 +-
 storage/pom.xml                                    |   5 +
 .../storage/inflater/CompressionChannel.java       |   3 +-
 .../sis/storage/geotiff/CompressedSubset.java      |   2 +-
 .../org/apache/sis/storage/geotiff/DataSubset.java |   2 +-
 .../sis/storage/geotiff/ReversedBitsChannel.java   |   2 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   3 +-
 storage/sis-sqlstore/pom.xml                       |   5 +
 .../sis/internal/sql/postgis/RasterReader.java     |   3 +-
 .../sis/internal/storage/TiledGridCoverage.java    |   2 +-
 .../sis/internal/storage/esri/RawRasterReader.java |   2 +-
 .../apache/sis/internal/storage/io/ByteWriter.java |   5 +-
 .../sis/internal/storage/wkt/FirstKeywordPeek.java |   2 +-
 .../sis/storage/AbstractGridCoverageResource.java  |   3 +-
 .../apache/sis/storage/event/StoreListeners.java   |  21 +---
 .../org/apache/sis/storage/event/package-info.java |   2 +-
 .../storage/xml/stream/FormattedWriter.java        |   6 +-
 .../sis/internal/storage/gpx/UpdaterTest.java      |   2 +-
 99 files changed, 250 insertions(+), 714 deletions(-)
 rename {core/sis-utility/src/main/java/org/apache/sis/internal/system => application/sis-webapp/src/main/java/org/apache/sis/services}/OSGiActivator.java (95%)
 rename {core/sis-utility/src/main/java/org/apache/sis/internal/system => application/sis-webapp/src/main/java/org/apache/sis/services}/ServletListener.java (95%)
 delete mode 100644 core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelPatch.java


[sis] 03/08: Set Java version requirement to Java 11 and update documentation. There is no code change in this commit.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 0083d298c7e906d5843482087a227d9b827db21b
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 15:03:17 2022 +0100

    Set Java version requirement to Java 11 and update documentation.
    There is no code change in this commit.
    
    https://issues.apache.org/jira/browse/SIS-561
---
 README                                                              | 2 +-
 application/sis-javafx/src/main/artifact/README                     | 2 +-
 .../src/main/java/org/apache/sis/feature/AbstractFeature.java       | 2 +-
 .../src/test/java/org/apache/sis/feature/FeatureTestCase.java       | 6 +++---
 .../main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java | 2 +-
 .../src/main/java/org/apache/sis/xml/MarshalContext.java            | 2 +-
 core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java         | 4 ++--
 .../java/org/apache/sis/referencing/AbstractIdentifiedObject.java   | 2 +-
 .../src/main/java/org/apache/sis/referencing/datum/formulas.html    | 2 +-
 .../org/apache/sis/referencing/operation/transform/formulas.html    | 2 +-
 .../java/org/apache/sis/parameter/DefaultParameterValueTest.java    | 4 +---
 .../sis/referencing/operation/transform/CoordinateDomain.java       | 2 +-
 .../src/main/java/org/apache/sis/internal/util/Numerics.java        | 2 +-
 core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java  | 2 +-
 .../src/main/java/org/apache/sis/util/CharSequences.java            | 4 ++--
 core/sis-utility/src/main/java/org/apache/sis/util/Locales.java     | 2 +-
 .../java/org/apache/sis/util/collection/BackingStoreException.java  | 2 +-
 .../src/main/java/org/apache/sis/util/collection/IntegerList.java   | 6 +++---
 pom.xml                                                             | 6 +++---
 src/main/javadoc/overview.html                                      | 2 +-
 .../org/apache/sis/internal/storage/xml/stream/FormattedWriter.java | 6 +++---
 21 files changed, 31 insertions(+), 33 deletions(-)

diff --git a/README b/README
index 28c8905911..d617b55a6d 100644
--- a/README
+++ b/README
@@ -24,7 +24,7 @@ project logo are trademarks of The Apache Software Foundation.
 Getting Started
 ===============
 
-Running the library part of Apache SIS requires Java 8 or higher.
+Running the library part of Apache SIS requires Java 11 or higher.
 Running the JavaFX application part requires Java 16 or higher.
 Building SIS requires Java 17 or higher
 together with Maven 3 <https://maven.apache.org/> build system.
diff --git a/application/sis-javafx/src/main/artifact/README b/application/sis-javafx/src/main/artifact/README
index e6f159db15..d51feb0e69 100644
--- a/application/sis-javafx/src/main/artifact/README
+++ b/application/sis-javafx/src/main/artifact/README
@@ -14,7 +14,7 @@ Installation
 ============
 
 For developing applications using the SIS library or for using on command-line,
-the only requirement is Java 8 or later. For launching the desktop application,
+the only requirement is Java 11 or later. For launching the desktop application,
 requirements are Java 16 or later and JavaFX 13 or later.
 
 1) Unzip `apache-sis-1.4-bin.zip` in any directory.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
index 1698f837e0..d126ecdd4d 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/feature/AbstractFeature.java
@@ -325,7 +325,7 @@ public abstract class AbstractFeature implements Feature, Serializable {
      * In the case of multi-valued properties (“max. occurs” &gt; 1), the collection returned by this method may
      * or may not be modifiable, at implementation choice. Generally the caller cannot add new elements into the
      * returned collection anyway since {@code Collection<?>} does not allow such operations, and more specific
-     * casts (e.g. {@code Collection<String>} cannot be checked at runtime (at least as of Java 8).
+     * casts (e.g. {@code Collection<String>} cannot be checked at runtime.
      * If a type-safe modifiable collection is desired, the following approach can be used instead:
      *
      * {@preformat java
diff --git a/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java b/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
index dbed0b40c6..32cd40a4ff 100644
--- a/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
+++ b/core/sis-feature/src/test/java/org/apache/sis/feature/FeatureTestCase.java
@@ -352,9 +352,9 @@ public abstract strictfp class FeatureTestCase extends TestCase {
                 Collections.singletonMap(DefaultFeatureType.NAME_KEY, "City"),
                 false, null, DefaultAttributeTypeTest.universities()));
         /*
-         * The value below is an instance of Collection<String>. But as of Java 8, the <String> parameterized type
-         * cannot be verified at runtime. The best check we can have is Collection<?>, which does not allow addition
-         * of new values.
+         * The value below is an instance of Collection<String>.
+         * But the <String> parameterized type cannot be verified at runtime.
+         * The best check we can have is Collection<?>, which does not allow addition of new values.
          */
         Collection<?> values = (Collection<?>) feature.getPropertyValue("universities");
         assertTrue("isEmpty", values.isEmpty());
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java
index 454c602786..1ce56e5d66 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/xml/StreamWriterDelegate.java
@@ -27,7 +27,7 @@ import org.apache.sis.util.Workaround;
  * By default each method does nothing but call the corresponding method on the wrapped instance.
  *
  * <p>This class is the complement of {@link javax.xml.stream.util.StreamReaderDelegate} provided
- * in standard JDK. For an unknown reason, JDK 8 does not provide a {@code StreamWriterDelegate}.</p>
+ * in standard JDK. For an unknown reason, Java 8 does not provide a {@code StreamWriterDelegate}.</p>
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 1.0
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshalContext.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshalContext.java
index 2e6b7b48be..123c1b509a 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshalContext.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/MarshalContext.java
@@ -69,7 +69,7 @@ public abstract class MarshalContext {
      * to use the UTC timezone as the default value, but some flexibility is allowed.
      *
      * <div class="warning"><b>Upcoming API change — Java time API</b>:
-     * return type may be changed to {@link java.time.ZoneId} when Apache SIS will target Java 8.
+     * return type may be changed to {@link java.time.ZoneId} in a future version.
      * This change may be applied in synchronization with GeoAPI 4.0.
      * </div>
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
index 9cda8ea15e..31ec54506d 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
@@ -522,7 +522,7 @@ public final class XML extends Static {
             }
         }
         /*
-         * STAX results are not handled by JAXB as of JDK 8. We have to handle those cases ourselves.
+         * STAX results are not handled by JAXB. We have to handle those cases ourselves.
          * This workaround should be removed if a future JDK version handles those cases.
          */
         if (output instanceof StAXResult) {
@@ -650,7 +650,7 @@ public final class XML extends Static {
         final Unmarshaller unmarshaller = pool.acquireUnmarshaller(properties);
         final Object object;
         /*
-         * STAX sources are not handled by javax.xml.bind.helpers.AbstractUnmarshallerImpl implementation as of JDK 8.
+         * STAX sources are not handled by javax.xml.bind.helpers.AbstractUnmarshallerImpl implementation.
          * We have to handle those cases ourselves. This workaround should be removed if a future JDK version handles
          * those cases.
          */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
index 0b9b14578f..40bac3475c 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
@@ -1023,7 +1023,7 @@ public class AbstractIdentifiedObject extends FormattableObject implements Ident
      * <h4>Why there is no <code>setNames(…)</code> method</h4>
      * Some JAXB implementations never invoke setter method for collections. Instead, they invoke the getter and
      * add directly the identifiers in the returned collection. Whether JAXB will perform or not a final call to
-     * {@code setNames(…)} is JAXB-implementation dependent (JDK7 does but JDK6 and JDK8 early access do not).
+     * {@code setNames(…)} is JAXB-implementation dependent (JDK7 does but JDK6 and JDK8 do not).
      * It seems a more portable approach (at least for JAXB reference implementations) to design our class
      * without setter method, in order to have the same behavior on all supported JDK versions.
      *
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html
index 2fa9484ff0..6e3b04419e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/formulas.html
@@ -29,7 +29,7 @@
     <div>This file contains formulas written in MathML for inclusion in the Javadoc of some classes in the
     <code>org.apache.sis.referencing.datum</code> package.
     Those formulas are provided in separated files for easier edition and for avoiding <code>javac</code> or
-    <code>javadoc</code> “<cite>unknown HTML tag</cite>” errors with JDK 8.
+    <code>javadoc</code> “<cite>unknown HTML tag</cite>” errors.
     Fragment of this files are inserted in the Javadoc by the following tag:
 
     <blockquote><pre>{@include formulas.html#<var>title</var>}</pre></blockquote>
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
index dd13387c09..124f9177c0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/formulas.html
@@ -29,7 +29,7 @@
     <div>This file contains formulas written in MathML for inclusion in the Javadoc of some classes in the
     <code>org.apache.sis.referencing.operation.transform</code> package.
     Those formulas are provided in separated files for easier edition and for avoiding <code>javac</code> or
-    <code>javadoc</code> “<cite>unknown HTML tag</cite>” errors with JDK 8.
+    <code>javadoc</code> “<cite>unknown HTML tag</cite>” errors.
     Fragment of this files are inserted in the Javadoc by the following tag:
 
     <blockquote><pre>{@include formulas.html#<var>title</var>}</pre></blockquote>
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java b/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
index 78ab185b4d..4118ad1104 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/parameter/DefaultParameterValueTest.java
@@ -491,9 +491,7 @@ public final strictfp class DefaultParameterValueTest extends TestCase {
      * Tests the creation of many parameters for integer and floating point values.
      * Some on those values are cached (e.g. 0, 90, 360) because frequently used.
      * It should be transparent to the user.
-     * Test also unit conversions (degrees to radians in this case).
-     *
-     * @todo Tests parallel instantiation on JDK8.
+     * Tests also unit conversions (degrees to radians in this case).
      */
     @Test
     @DependsOnMethod({"testBoundedInteger", "testBoundedDouble"})
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateDomain.java b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateDomain.java
index 076aff8721..914ed1d699 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateDomain.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/referencing/operation/transform/CoordinateDomain.java
@@ -39,7 +39,7 @@ import org.apache.sis.referencing.datum.GeodeticDatumMock;
 public strictfp class CoordinateDomain {
     /*
      * Note: this class is not declared as an enum yet because moving ARTICLE_CIRCLE and HEIGHT constants
-     *       after the enum declarations causes an "illegal forward reference" compiler error with JDK 8.
+     *       after the enum declarations causes an "illegal forward reference" compiler error.
      */
 
 
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
index 673ec3ec4a..63df579148 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/util/Numerics.java
@@ -45,7 +45,7 @@ import static java.lang.Math.ulp;
  */
 public final class Numerics extends Static {
     /**
-     * Some frequently used {@link Double} values. As of Java 8, those values do not
+     * Some frequently used {@link Double} values. As of Java 11, those values do not
      * seem to be cached by {@link Double#valueOf(double)} like JDK does for integers.
      */
     private static final Map<Object,Object> CACHE = new HashMap<>(32);
diff --git a/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java b/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
index 061a790e1a..6554d6bd86 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/setup/OptionKey.java
@@ -97,7 +97,7 @@ public class OptionKey<T> implements Serializable {
      * That default is often, but not necessarily, the {@linkplain TimeZone#getDefault() platform default}.
      *
      * <div class="warning"><b>Upcoming API change — Java time API</b>:
-     * the type may be changed to {@link java.time.ZoneId} when Apache SIS will target Java 8.
+     * the type may be changed to {@link java.time.ZoneId} in a future version.
      * This change may be applied in synchronization with GeoAPI 4.0.
      * </div>
      *
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java b/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
index 16faea7be2..53d2d655cb 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
@@ -691,9 +691,9 @@ search:     for (; fromIndex <= toIndex; fromIndex++) {
      * </ul>
      *
      * <div class="note"><b>Performance note:</b>
-     * Prior JDK8 this method was usually cheap because all string instances created by
+     * Prior Java 8 this method was usually cheap because all string instances created by
      * {@link String#substring(int,int)} shared the same {@code char[]} internal array.
-     * However, since JDK8, the new {@code String} implementation copies the data in new arrays.
+     * However, since Java 8, the new {@code String} implementation copies the data in new arrays.
      * Consequently, it is better to use index rather than this method for splitting large {@code String}s.
      * However, this method still useful for other {@link CharSequence} implementations providing an efficient
      * {@code subSequence(int,int)} method.</div>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java b/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
index d4c4b549dd..2a1187fc21 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Locales.java
@@ -98,7 +98,7 @@ public final class Locales extends Static {
      * to {@code String} instances.
      *
      * <div class="note"><b>Implementation note:</b>
-     * Oracle JDK8 implementation computes the 3-letters codes on-the-fly instead of holding references
+     * OpenJDK 8 implementation computes the 3-letters codes on-the-fly instead of holding references
      * to pre-existing strings. If we were holding string references here, we would prevent the garbage
      * collector to collect the strings for all languages and countries. This would probably be a waste
      * of resources.</div>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
index a57b3d3472..41747868f1 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/BackingStoreException.java
@@ -43,7 +43,7 @@ import org.apache.sis.util.Exceptions;
  * }
  *
  * <h2>Relationship with {@code java.io.UncheckedIOException}</h2>
- * JDK8 provides a {@link java.io.UncheckedIOException} which partially overlaps
+ * Java 8 provides a {@link java.io.UncheckedIOException} which partially overlaps
  * the purpose of this {@code BackingStoreException}. While Apache SIS still uses
  * {@code BackingStoreException} as a general mechanism for any kind of checked exceptions,
  * client code would be well advised to catch both kind of exceptions for robustness.
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/collection/IntegerList.java b/core/sis-utility/src/main/java/org/apache/sis/util/collection/IntegerList.java
index d073336935..ced2161d52 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/collection/IntegerList.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/collection/IntegerList.java
@@ -451,7 +451,7 @@ public class IntegerList extends AbstractList<Integer> implements RandomAccess,
      *
      * @return iterator over the integer values in this list.
      *
-     * @since 0.8-jdk8
+     * @since 1.0
      */
     @Override
     public PrimitiveIterator.OfInt iterator() {
@@ -464,7 +464,7 @@ public class IntegerList extends AbstractList<Integer> implements RandomAccess,
      *
      * @return spliterator over the integer values in this list.
      *
-     * @since 0.8-jdk8
+     * @since 1.0
      */
     @Override
     public Spliterator.OfInt spliterator() {
@@ -482,7 +482,7 @@ public class IntegerList extends AbstractList<Integer> implements RandomAccess,
      * @param parallel  {@code true} for a parallel stream, or {@code false} for a sequential stream.
      * @return a stream of values in this list as primitive types.
      *
-     * @since 0.8-jdk8
+     * @since 1.0
      */
     public IntStream stream(boolean parallel) {
         return StreamSupport.intStream(spliterator(), parallel);
diff --git a/pom.xml b/pom.xml
index b44f90992d..f5e7421ed3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
      Maven project configuration file
      http://maven.apache.org/
 
-     Apache SIS build requires Java 11 or higher, but compiled files can be executed on Java 8.
+     Apache SIS build requires Java 17 or higher, but compiled files can be executed on Java 11.
      Setting the SIS_DATA environment variable before build is optional but recommended.
 
      Build development snapshot:        mvn clean install
@@ -553,8 +553,8 @@
     <website.locale>en</website.locale>
 
     <!-- Following properties are branch-specific -->
-    <maven.compiler.source>8</maven.compiler.source>
-    <maven.compiler.target>8</maven.compiler.target>
+    <maven.compiler.source>11</maven.compiler.source>
+    <maven.compiler.target>11</maven.compiler.target>
     <sis.plugin.version>${project.version}</sis.plugin.version>
     <sis.non-free.version>1.3</sis.non-free.version>                <!-- Used only if "non-free" profile is activated. -->
     <javafx.version>19</javafx.version>                             <!-- Used only if "javafx" profile is activated. -->
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index 06cf5f69de..0d97dabd0c 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/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 8 Standard Edition.</p>
+    <p>SIS requires Java 11 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/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
index ca816cb671..64dd34e31f 100644
--- a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
+++ b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/FormattedWriter.java
@@ -29,9 +29,9 @@ import org.apache.sis.internal.xml.StreamWriterDelegate;
  * an alternative approach would have been to provide {@code startIdentation()} and {@code endIndentation()}
  * convenience methods in {@link StaxStreamWriter}, and let subclasses perform their own formatting. It would
  * reduce the need to try to guess some formatting aspects (e.g. whether to format on a single line or not).
- * However, that approach does not integrate very well with JAXB; the {@code Marshaller.JAXB_FORMATTED_OUTPUT}
- * property seems to be ignored when marshalling a fragment using {@code XMLStreamWriter}. Even if that property
- * was supported, there is no standard way as of JDK8 to tell to JAXB to begin the indentation at some level
+ * However, that approach does not integrate very well with JAXB. The {@code Marshaller.JAXB_FORMATTED_OUTPUT}
+ * property seems to be ignored when marshalling a fragment using {@code XMLStreamWriter}.
+ * Even if that property was supported, we found no way to tell to JAXB to begin the indentation at some level
  * (for taking in account the indentation of the elements containing the fragment to marshal with JAXB).</div>
  *
  * @author  Martin Desruisseaux (Geomatys)


[sis] 05/08: Move JavaEE 8 dependency to `sis-webapp` module. Update links to Java 8 documentation. Update NetBeans project configuration.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 3755cb816ab8cf5d629c434bada8df5cfb81633a
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 15:56:32 2022 +0100

    Move JavaEE 8 dependency to `sis-webapp` module.
    Update links to Java 8 documentation.
    Update NetBeans project configuration.
---
 application/sis-webapp/pom.xml                     |  2 ++
 .../org/apache/sis/services}/ServletListener.java  |  8 +++----
 core/sis-utility/pom.xml                           |  4 ----
 .../apache/sis/internal/system/OSGiActivator.java  |  3 ---
 .../java/org/apache/sis/setup/GeometryLibrary.java |  2 --
 ide-project/NetBeans/nbproject/build-impl.xml      | 25 +++++++---------------
 ide-project/NetBeans/nbproject/genfiles.properties |  6 +++---
 ide-project/NetBeans/nbproject/project.properties  |  7 ++----
 ide-project/NetBeans/nbproject/project.xml         |  1 -
 pom.xml                                            |  8 +------
 10 files changed, 19 insertions(+), 47 deletions(-)

diff --git a/application/sis-webapp/pom.xml b/application/sis-webapp/pom.xml
index 1a8ab8114e..c59f243964 100644
--- a/application/sis-webapp/pom.xml
+++ b/application/sis-webapp/pom.xml
@@ -41,6 +41,8 @@
     <dependency>
       <groupId>javax</groupId>
       <artifactId>javaee-api</artifactId>
+      <version>8.0.1</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/ServletListener.java b/application/sis-webapp/src/main/java/org/apache/sis/services/ServletListener.java
similarity index 95%
rename from core/sis-utility/src/main/java/org/apache/sis/internal/system/ServletListener.java
rename to application/sis-webapp/src/main/java/org/apache/sis/services/ServletListener.java
index a6ffb485a5..9fb0f93c88 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/ServletListener.java
+++ b/application/sis-webapp/src/main/java/org/apache/sis/services/ServletListener.java
@@ -14,11 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.system;
+package org.apache.sis.services;
 
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 import javax.servlet.annotation.WebListener;
+import org.apache.sis.internal.system.Shutdown;
 
 
 /**
@@ -27,10 +28,7 @@ import javax.servlet.annotation.WebListener;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.7
- *
- * @see OSGiActivator
- *
- * @since 0.3
+ * @since   0.3
  * @module
  */
 @WebListener("Apache SIS shutdown hook")
diff --git a/core/sis-utility/pom.xml b/core/sis-utility/pom.xml
index 95590b6fe4..e314d97b1a 100644
--- a/core/sis-utility/pom.xml
+++ b/core/sis-utility/pom.xml
@@ -146,10 +146,6 @@
       <groupId>org.osgi</groupId>
       <artifactId>org.osgi.core</artifactId>
     </dependency>
-    <dependency>
-      <groupId>javax</groupId>
-      <artifactId>javaee-api</artifactId>
-    </dependency>
   </dependencies>
 
 </project>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
index 9aeae85fb5..1c8f9a83f7 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
@@ -29,9 +29,6 @@ import org.osgi.framework.BundleListener;
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @version 0.7
- *
- * @see ServletListener
- *
  * @since 0.3
  * @module
  */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/setup/GeometryLibrary.java b/core/sis-utility/src/main/java/org/apache/sis/setup/GeometryLibrary.java
index 53f1624726..eb8c593ba9 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/setup/GeometryLibrary.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/setup/GeometryLibrary.java
@@ -52,8 +52,6 @@ public enum GeometryLibrary {
      *
      * Note that contrarily to JTS and ESRI libraries,
      * a point does not extend any root geometry class in Java2D.
-     *
-     * @see <a href="http://docs.oracle.com/javase/8/docs/technotes/guides/2d/index.html">Java2D home page</a>
      */
     JAVA2D,
 
diff --git a/ide-project/NetBeans/nbproject/build-impl.xml b/ide-project/NetBeans/nbproject/build-impl.xml
index 26f5723df3..76bd35adae 100644
--- a/ide-project/NetBeans/nbproject/build-impl.xml
+++ b/ide-project/NetBeans/nbproject/build-impl.xml
@@ -90,7 +90,7 @@ is divided into following sections:
                 </not>
             </condition>
         </fail>
-        <j2seproject3:modulename property="module.name" sourcepath="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}"/>
+        <j2seproject3:modulename property="module.name" sourcepath="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}"/>
         <condition property="named.module.internal">
             <and>
                 <isset property="module.name"/>
@@ -203,7 +203,6 @@ is divided into following sections:
             <or>
                 <available file="${src.local-src.dir}"/>
                 <available file="${src.javafx.dir}"/>
-                <available file="${src.webapp.dir}"/>
                 <available file="${src.console.dir}"/>
                 <available file="${src.portrayal.dir}"/>
                 <available file="${src.earth-obs.dir}"/>
@@ -324,7 +323,6 @@ is divided into following sections:
     <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
         <fail unless="src.local-src.dir">Must set src.local-src.dir</fail>
         <fail unless="src.javafx.dir">Must set src.javafx.dir</fail>
-        <fail unless="src.webapp.dir">Must set src.webapp.dir</fail>
         <fail unless="src.console.dir">Must set src.console.dir</fail>
         <fail unless="src.portrayal.dir">Must set src.portrayal.dir</fail>
         <fail unless="src.earth-obs.dir">Must set src.earth-obs.dir</fail>
@@ -378,7 +376,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.modulepath}" name="modulepath"/>
@@ -390,7 +388,7 @@ is divided into following sections:
             <attribute default="${excludes}" name="excludes"/>
             <attribute default="${javac.debug}" name="debug"/>
             <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/>
-            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" if:set="named.module.internal" name="sourcepath"/>
+            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" if:set="named.module.internal" name="sourcepath"/>
             <attribute default="${empty.dir}" name="gensrcdir"/>
             <element name="customize" optional="true"/>
             <sequential>
@@ -445,7 +443,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.modulepath}" name="modulepath"/>
@@ -488,7 +486,7 @@ is divided into following sections:
     </target>
     <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
         <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <attribute default="${javac.modulepath}" name="modulepath"/>
@@ -523,7 +521,7 @@ is divided into following sections:
     </target>
     <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
         <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
-            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
+            <attribute default="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}" name="srcdir"/>
             <attribute default="${build.classes.dir}" name="destdir"/>
             <attribute default="${javac.classpath}" name="classpath"/>
             <sequential>
@@ -1263,14 +1261,13 @@ is divided into following sections:
                 <include name="*"/>
             </dirset>
         </pathconvert>
-        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}:${build.generated.subdirs}"/>
+        <j2seproject3:depend srcdir="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-profile.dir}:${build.generated.subdirs}"/>
     </target>
     <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
         <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
         <copy todir="${build.classes.dir}">
             <fileset dir="${src.local-src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.javafx.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
-            <fileset dir="${src.webapp.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.console.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.portrayal.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
             <fileset dir="${src.earth-obs.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
@@ -1307,7 +1304,7 @@ is divided into following sections:
     <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
         <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
         <j2seproject3:force-recompile/>
-        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.local-src.dir}:${src.javafx.dir}:${src.webapp.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile. [...]
+        <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.local-src.dir}:${src.javafx.dir}:${src.console.dir}:${src.portrayal.dir}:${src.earth-obs.dir}:${src.geotiff.dir}:${src.netcdf.dir}:${src.shapefile.dir}:${src.sql.dir}:${src.xmlstore.dir}:${src.storage.dir}:${src.feature.dir}:${src.referencing.dir}:${src.ref-by-id.dir}:${src.metadata.dir}:${src.utility.dir}:${src.fra-profile.dir}:${src.jpn-pro [...]
     </target>
     <target name="-post-compile-single">
         <!-- Empty placeholder for easier customization. -->
@@ -1705,9 +1702,6 @@ is divided into following sections:
             <fileset dir="${src.javafx.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
-            <fileset dir="${src.webapp.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
-                <filename name="**/*.java"/>
-            </fileset>
             <fileset dir="${src.console.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}">
                 <filename name="**/*.java"/>
             </fileset>
@@ -1770,9 +1764,6 @@ is divided into following sections:
             <fileset dir="${src.javafx.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
-            <fileset dir="${src.webapp.dir}" excludes="${excludes}" includes="${includes}">
-                <filename name="**/doc-files/**"/>
-            </fileset>
             <fileset dir="${src.console.dir}" excludes="${excludes}" includes="${includes}">
                 <filename name="**/doc-files/**"/>
             </fileset>
diff --git a/ide-project/NetBeans/nbproject/genfiles.properties b/ide-project/NetBeans/nbproject/genfiles.properties
index fde32dd120..2427112a0b 100644
--- a/ide-project/NetBeans/nbproject/genfiles.properties
+++ b/ide-project/NetBeans/nbproject/genfiles.properties
@@ -3,6 +3,6 @@
 build.xml.data.CRC32=58e6b21c
 build.xml.script.CRC32=462eaba0
 build.xml.stylesheet.CRC32=28e38971@1.53.1.46
-nbproject/build-impl.xml.data.CRC32=f706d4ab
-nbproject/build-impl.xml.script.CRC32=6b1e829a
-nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.101.0.48
+nbproject/build-impl.xml.data.CRC32=fd717426
+nbproject/build-impl.xml.script.CRC32=69d63511
+nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.104.0.48
diff --git a/ide-project/NetBeans/nbproject/project.properties b/ide-project/NetBeans/nbproject/project.properties
index 641e600dfe..e6ace69739 100644
--- a/ide-project/NetBeans/nbproject/project.properties
+++ b/ide-project/NetBeans/nbproject/project.properties
@@ -37,8 +37,8 @@ project.license      = apache20
 project.licensePath  = ../LicenseHeader.txt
 no.dependencies      = true
 source.encoding      = UTF-8
-javac.source         = 1.8
-javac.target         = 1.8
+javac.source         = 11
+javac.target         = 11
 platform.active      = default_platform
 junit.forkmode       = once
 run.jvmargs          = -enableassertions ${javafx.options} \
@@ -53,7 +53,6 @@ project.root         = ../..
 src.local-src.dir    = ../local-src
 src.javafx.dir       = ${project.root}/application/sis-javafx/doc
 test.javafx.dir      = ${project.root}/application/sis-javafx/doc
-src.webapp.dir       = ${project.root}/application/sis-webapp/src/main/java
 src.console.dir      = ${project.root}/application/sis-console/src/main/java
 test.console.dir     = ${project.root}/application/sis-console/src/test/java
 src.earth-obs.dir    = ${project.root}/storage/sis-earth-observation/src/main/java
@@ -111,7 +110,6 @@ re2j.version         = 1.3
 esri.api.version     = 2.2.4
 jts.version          = 1.19.0
 jdom2.version        = 2.0.6
-jee.version          = 8.0.1
 osgi.version         = 6.0.0
 netcdf.version       = 5.5.3
 joda-time.version    = 2.10.3
@@ -138,7 +136,6 @@ javac.classpath=\
     ${maven.repository}/jakarta/xml/bind/jakarta.xml.bind-api/${jaxb.version}/jakarta.xml.bind-api-${jaxb.version}.jar:\
     ${maven.repository}/com/esri/geometry/esri-geometry-api/${esri.api.version}/esri-geometry-api-${esri.api.version}.jar:\
     ${maven.repository}/org/locationtech/jts/jts-core/${jts.version}/jts-core-${jts.version}.jar:\
-    ${maven.repository}/javax/javaee-api/${jee.version}/javaee-api-${jee.version}.jar:\
     ${maven.repository}/org/postgresql/postgresql/${postgresql.version}/postgresql-${postgresql.version}.jar:\
     ${maven.repository}/edu/ucar/cdm-core/${netcdf.version}/cdm-core-${netcdf.version}.jar:\
     ${maven.repository}/edu/ucar/udunits/${netcdf.version}/udunits-${netcdf.version}.jar:\
diff --git a/ide-project/NetBeans/nbproject/project.xml b/ide-project/NetBeans/nbproject/project.xml
index e247d6fa1b..73c362359f 100644
--- a/ide-project/NetBeans/nbproject/project.xml
+++ b/ide-project/NetBeans/nbproject/project.xml
@@ -25,7 +25,6 @@
             <source-roots>
                 <root id="src.local-src.dir" name="Local sources (unversioned)"/>
                 <root id="src.javafx.dir" name="JavaFX application"/>
-                <root id="src.webapp.dir" name="Web application"/>
                 <root id="src.console.dir" name="Console"/>
                 <root id="src.portrayal.dir" name="Portrayal"/>
                 <root id="src.earth-obs.dir" name="Earth observation"/>
diff --git a/pom.xml b/pom.xml
index 29575fe45d..416481c0fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -459,12 +459,6 @@
         <version>2.0</version>
         <scope>test</scope>
       </dependency>
-      <dependency>
-        <groupId>javax</groupId>
-        <artifactId>javaee-api</artifactId>
-        <version>8.0.1</version>
-        <scope>provided</scope>
-      </dependency>
       <dependency>
         <groupId>jakarta.xml.bind</groupId>
         <artifactId>jakarta.xml.bind-api</artifactId>
@@ -879,7 +873,7 @@
           <validateLinks>true</validateLinks>                   <!-- Validates content of package-list resources. -->
           <detectJavaApiLink>false</detectJavaApiLink>          <!-- Let us declare link to Java API. -->
           <links>
-            <link>https://docs.oracle.com/javase/8/docs/api</link>
+            <link>https://docs.oracle.com/en/java/javase/11/docs/api</link>
             <link>http://unitsofmeasurement.github.io/unit-api/site/apidocs</link>
             <link>http://www.geoapi.org/snapshot/javadoc</link>
           </links>


[sis] 04/08: Upgrade Derby dependency to series 10.15, which is the last series compatible with Java 11.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit a5835a6c1cb0883f51c8021a96f11ef9829f6ae7
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 15:32:47 2022 +0100

    Upgrade Derby dependency to series 10.15, which is the last series compatible with Java 11.
---
 application/sis-console/pom.xml                   | 5 +++++
 application/sis-javafx/pom.xml                    | 5 +++++
 application/sis-openoffice/pom.xml                | 5 +++++
 core/sis-metadata/pom.xml                         | 5 +++++
 core/sis-referencing-by-identifiers/pom.xml       | 5 +++++
 core/sis-referencing/pom.xml                      | 5 +++++
 ide-project/NetBeans/nbproject/project.properties | 6 +++++-
 pom.xml                                           | 8 +++++++-
 storage/pom.xml                                   | 5 +++++
 storage/sis-sqlstore/pom.xml                      | 5 +++++
 10 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/application/sis-console/pom.xml b/application/sis-console/pom.xml
index 26c640bc56..1a2a8de793 100644
--- a/application/sis-console/pom.xml
+++ b/application/sis-console/pom.xml
@@ -120,6 +120,11 @@
       <artifactId>derby</artifactId>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>runtime</scope>
+    </dependency>
 
     <!-- Test dependencies -->
     <dependency>
diff --git a/application/sis-javafx/pom.xml b/application/sis-javafx/pom.xml
index 93549d369d..288e90bd76 100644
--- a/application/sis-javafx/pom.xml
+++ b/application/sis-javafx/pom.xml
@@ -173,6 +173,11 @@
       <artifactId>derby</artifactId>
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>runtime</scope>
+    </dependency>
 
     <!-- Test dependencies -->
     <dependency>
diff --git a/application/sis-openoffice/pom.xml b/application/sis-openoffice/pom.xml
index b588a5d4ea..f3f7e939f9 100644
--- a/application/sis-openoffice/pom.xml
+++ b/application/sis-openoffice/pom.xml
@@ -132,6 +132,11 @@
           <artifactId>derby</artifactId>
           <scope>runtime</scope>
         </dependency>
+        <dependency>
+          <groupId>org.apache.derby</groupId>
+          <artifactId>derbytools</artifactId>
+          <scope>runtime</scope>
+        </dependency>
       </dependencies>
     </profile>
   </profiles>
diff --git a/core/sis-metadata/pom.xml b/core/sis-metadata/pom.xml
index 2721092845..013bb1633a 100644
--- a/core/sis-metadata/pom.xml
+++ b/core/sis-metadata/pom.xml
@@ -164,6 +164,11 @@
       <artifactId>derby</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
diff --git a/core/sis-referencing-by-identifiers/pom.xml b/core/sis-referencing-by-identifiers/pom.xml
index 7efb9707cc..13e7fedd3c 100644
--- a/core/sis-referencing-by-identifiers/pom.xml
+++ b/core/sis-referencing-by-identifiers/pom.xml
@@ -144,6 +144,11 @@
       <artifactId>derby</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/core/sis-referencing/pom.xml b/core/sis-referencing/pom.xml
index 09367012f9..8584a8373e 100644
--- a/core/sis-referencing/pom.xml
+++ b/core/sis-referencing/pom.xml
@@ -169,6 +169,11 @@
       <artifactId>derby</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
diff --git a/ide-project/NetBeans/nbproject/project.properties b/ide-project/NetBeans/nbproject/project.properties
index 3b2f26b94e..641e600dfe 100644
--- a/ide-project/NetBeans/nbproject/project.properties
+++ b/ide-project/NetBeans/nbproject/project.properties
@@ -121,7 +121,7 @@ cm-logging.version   = 1.2
 slf4j.version        = 1.7.28
 junit.version        = 4.13.2
 hamcrest.version     = 1.3
-derby.version        = 10.14.2.0
+derby.version        = 10.15.2.0
 hsqldb.version       = 2.7.1
 h2.version           = 2.1.214
 postgresql.version   = 42.5.1
@@ -149,6 +149,8 @@ javac.processorpath=\
 javac.test.classpath=\
     ${javac.classpath}:\
     ${maven.repository}/org/apache/derby/derby/${derby.version}/derby-${derby.version}.jar:\
+    ${maven.repository}/org/apache/derby/derbytools/${derby.version}/derbytools-${derby.version}.jar:\
+    ${maven.repository}/org/apache/derby/derbyshared/${derby.version}/derbyshared-${derby.version}.jar:\
     ${maven.repository}/org/hsqldb/hsqldb/${hsqldb.version}/hsqldb-${hsqldb.version}.jar:\
     ${maven.repository}/com/h2database/h2/${h2.version}/h2-${h2.version}.jar:\
     ${maven.repository}/gov/nist/math/jama/${jama.version}/jama-${jama.version}.jar:\
@@ -179,6 +181,8 @@ run.classpath=\
     ${build.classes.dir}:\
     ${run.jaxb.classpath}:\
     ${maven.repository}/org/apache/derby/derby/${derby.version}/derby-${derby.version}.jar:\
+    ${maven.repository}/org/apache/derby/derbytools/${derby.version}/derbytools-${derby.version}.jar:\
+    ${maven.repository}/org/apache/derby/derbyshared/${derby.version}/derbyshared-${derby.version}.jar:\
     ${run.netcdf.classpath}
 run.test.classpath=\
     ${javac.test.classpath}:\
diff --git a/pom.xml b/pom.xml
index f5e7421ed3..29575fe45d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -486,7 +486,13 @@
       <dependency>
         <groupId>org.apache.derby</groupId>
         <artifactId>derby</artifactId>
-        <version>10.14.2.0</version>        <!-- 10.14 is the last series compatible with JDK 8. -->
+        <version>10.15.2.0</version>        <!-- 10.15 is the last series compatible with JDK 11. -->
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.derby</groupId>
+        <artifactId>derbytools</artifactId>
+        <version>10.15.2.0</version>
         <scope>test</scope>
       </dependency>
       <dependency>
diff --git a/storage/pom.xml b/storage/pom.xml
index 1172482c55..4287379b06 100644
--- a/storage/pom.xml
+++ b/storage/pom.xml
@@ -149,6 +149,11 @@
       <artifactId>derby</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.apache.sis.core</groupId>
       <artifactId>sis-utility</artifactId>
diff --git a/storage/sis-sqlstore/pom.xml b/storage/sis-sqlstore/pom.xml
index cf1f6f385c..1e1b16d0a7 100644
--- a/storage/sis-sqlstore/pom.xml
+++ b/storage/sis-sqlstore/pom.xml
@@ -129,6 +129,11 @@
       <artifactId>derby</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derbytools</artifactId>
+      <scope>test</scope>
+    </dependency>
     <dependency>
       <groupId>org.hsqldb</groupId>
       <artifactId>hsqldb</artifactId>


[sis] 02/08: Post-release: remove deprecated methods.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9bb1d80d200826cc73e15463fbe421c23d640968
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 14:30:00 2022 +0100

    Post-release: remove deprecated methods.
---
 .../apache/sis/gui/coverage/CoverageExplorer.java  | 19 +------
 .../org/apache/sis/gui/coverage/package-info.java  |  2 +-
 .../java/org/apache/sis/gui/map/StatusBar.java     | 63 +---------------------
 .../java/org/apache/sis/gui/map/package-info.java  |  2 +-
 .../gui/referencing/RecentReferenceSystems.java    | 20 +------
 .../apache/sis/gui/referencing/package-info.java   |  2 +-
 .../org/apache/sis/coverage/grid/GridExtent.java   | 27 +---------
 .../org/apache/sis/coverage/grid/GridGeometry.java | 31 +----------
 .../org/apache/sis/coverage/grid/package-info.java |  2 +-
 .../org/apache/sis/util/iso/DefaultTypeName.java   | 17 +-----
 .../java/org/apache/sis/util/iso/package-info.java |  2 +-
 .../main/java/org/apache/sis/referencing/CRS.java  | 20 +------
 .../transform/DefaultMathTransformFactory.java     | 42 +--------------
 .../operation/transform/package-info.java          |  2 +-
 .../org/apache/sis/referencing/package-info.java   |  2 +-
 .../apache/sis/util/logging/PerformanceLevel.java  |  8 +--
 .../org/apache/sis/util/logging/package-info.java  |  2 +-
 .../apache/sis/storage/event/StoreListeners.java   | 21 +-------
 .../org/apache/sis/storage/event/package-info.java |  2 +-
 19 files changed, 20 insertions(+), 266 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
index 2c45e8b46f..afcf1f213c 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/CoverageExplorer.java
@@ -71,7 +71,7 @@ import org.apache.sis.gui.Widget;
  * implementation may generalize to {@link org.opengis.coverage.Coverage} instances.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  *
  * @see CoverageCanvas
  * @see GridView
@@ -221,23 +221,6 @@ public class CoverageExplorer extends Widget {
      */
     private WindowHandler window;
 
-    /**
-     * Creates an initially empty explorer with default view type.
-     * By default {@code CoverageExplorer} will show a coverage as a table of values,
-     * i.e. the default view type is {@link View#TABLE}.
-     *
-     * <div class="note"><b>API note:</b>
-     * the reason for setting default value to tabular data is because it requires loading much less data with
-     * {@link java.awt.image.RenderedImage}s supporting deferred tile loading. By contrast {@link View#IMAGE}
-     * may require loading the full image.</div>
-     *
-     * @deprecated Use {@link #CoverageExplorer(View)}.
-     */
-    @Deprecated
-    public CoverageExplorer() {
-        this(View.TABLE);
-    }
-
     /**
      * Creates an initially empty explorer with the specified view type.
      *
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/package-info.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/package-info.java
index 15aaa4ab0c..94bab9bdcb 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/package-info.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/coverage/package-info.java
@@ -19,7 +19,7 @@
  * Widgets showing {@link org.apache.sis.coverage.grid.GridCoverage} images or sample values.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.1
  * @module
  */
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java
index f1cb16d175..798c860f07 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/StatusBar.java
@@ -124,7 +124,7 @@ import org.apache.sis.referencing.gazetteer.ReferencingByIdentifiers;
  * {@link #setLocalCoordinates(double, double)} explicitly instead.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.1
  * @module
  */
@@ -568,20 +568,6 @@ public class StatusBar extends Widget implements EventHandler<MouseEvent> {
         });
     }
 
-    /**
-     * @deprecated Replaced by {@link #StatusBar(RecentReferenceSystems)} followed by {@link #track(MapCanvas)}.
-     *
-     * @param  systemChooser  the manager of reference systems chosen by user, or {@code null} if none.
-     * @param  toTrack        the canvas that this status bar is tracking.
-     */
-    @Deprecated
-    public StatusBar(final RecentReferenceSystems systemChooser, final MapCanvas... toTrack) {
-        this(systemChooser);
-        for (final MapCanvas canvas : toTrack) {
-            track(canvas);
-        }
-    }
-
     /**
      * Registers listeners on the specified canvas for tracking mouse movements.
      * After this method call, this {@code StatusBar} will show coordinates (usually geographic or projected)
@@ -1300,41 +1286,6 @@ public class StatusBar extends Widget implements EventHandler<MouseEvent> {
         return new int[] {xDimension, yDimension};
     }
 
-    /**
-     * Returns the lowest value appended as "± <var>accuracy</var>" after the coordinate values.
-     * This is the last value specified to {@link #setLowestAccuracy(Quantity)}.
-     *
-     * @return the lowest accuracy to append after the coordinate values, or {@code null} if none.
-     *
-     * @see CoordinateFormat#getGroundAccuracy()
-     *
-     * @deprecated Replaced by {@link #lowestAccuracy}.
-     */
-    @Deprecated
-    public Quantity<Length> getLowestAccuracy() {
-        return lowestAccuracy.get();
-    }
-
-    /**
-     * Specifies an uncertainty to append as "± <var>accuracy</var>" after the coordinate values.
-     * If user has selected (e.g. by contextual menu) a CRS causing the use of a coordinate transformation,
-     * then the accuracy actually shown by {@code StatusBar} will be the greatest value between the accuracy
-     * specified to this method and the coordinate transformation accuracy.
-     *
-     * <p>Note that the "± <var>accuracy</var>" text may be shown or hidden depending on the zoom level.
-     * If pixels on screen are larger than the accuracy, then the accuracy text is hidden.</p>
-     *
-     * @param  accuracy  the lowest accuracy to append after the coordinate values, or {@code null} if none.
-     *
-     * @see CoordinateFormat#setGroundAccuracy(Quantity)
-     *
-     * @deprecated Replaced by {@link #lowestAccuracy}.
-     */
-    @Deprecated
-    public void setLowestAccuracy(final Quantity<Length> accuracy) {
-        lowestAccuracy.set(accuracy);
-    }
-
     /**
      * Returns the coordinates given to the last call to {@link #setLocalCoordinates(double, double)},
      * or an empty value if those coordinates are not visible.
@@ -1635,18 +1586,6 @@ public class StatusBar extends Widget implements EventHandler<MouseEvent> {
         return Optional.ofNullable(message.getText());
     }
 
-    /**
-     * Returns the error message currently shown.
-     *
-     * @return the current error message, or an empty value if none.
-     *
-     * @deprecated Renamed {@link #getMessage()}.
-     */
-    @Deprecated
-    public Optional<String> getErrorMessage() {
-        return Optional.ofNullable(message.getText());
-    }
-
     /**
      * Shows or hides an informative message on the status bar.
      * The message should be temporary, for example for telling that a loading is in progress.
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/package-info.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/package-info.java
index 4ddaa18730..798eba1fc9 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/map/package-info.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/map/package-info.java
@@ -22,7 +22,7 @@
  * {@link org.apache.sis.gui.map.MapCanvasAWT} is a specialization for painting the map using Java2D.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.1
  * @module
  */
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/RecentReferenceSystems.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/RecentReferenceSystems.java
index 4aa54d5348..0225ca9f14 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/RecentReferenceSystems.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/RecentReferenceSystems.java
@@ -83,7 +83,7 @@ import static java.util.logging.Logger.getLogger;
  * </ul>
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.1
  * @module
  */
@@ -1047,23 +1047,7 @@ next:       for (int i=0; i<count; i++) {
     }
 
     /**
-     * @deprecated Replaced by {@link #createChoiceBox(boolean, ChangeListener)}.
-     */
-    @Deprecated
-    public ChoiceBox<ReferenceSystem> createChoiceBox(final ChangeListener<ReferenceSystem> action) {
-        return createChoiceBox(true, action);
-    }
-
-    /**
-     * @deprecated Replaced by {@link #createMenuItems(boolean, ChangeListener)}.
-     */
-    @Deprecated
-    public Menu createMenuItems(final ChangeListener<ReferenceSystem> action) {
-        return createMenuItems(true, action);
-    }
-
-    /**
-     * Returns the property for the selected value in a menu created by {@link #createMenuItems(ChangeListener)}.
+     * Returns the property for the selected value in a menu created by {@link #createMenuItems(boolean, ChangeListener)}.
      *
      * @param  menu  the menu, or {@code null} if none.
      * @return the property for the selected value, or {@code null} if none.
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/package-info.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/package-info.java
index c8566efa33..3b9b9019ff 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/package-info.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/referencing/package-info.java
@@ -20,7 +20,7 @@
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.1
+ * @version 1.4
  * @since   1.1
  * @module
  */
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
index c9a7e25070..16a8e1b5bd 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridExtent.java
@@ -93,7 +93,7 @@ import org.opengis.coverage.PointOutsideCoverageException;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Alexis Manin (Geomatys)
  * @author  Johann Sorel (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.0
  * @module
  */
@@ -825,16 +825,6 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
         return Numerics.toUnsignedDouble(size);
     }
 
-    /**
-     * @deprecated Replaced by {@link #getPointOfInterest(PixelInCell)}.
-     *
-     * @return the grid coordinates of a representative point.
-     */
-    @Deprecated
-    public double[] getPointOfInterest() {
-        return getPointOfInterest(PixelInCell.CELL_CORNER);
-    }
-
     /**
      * Returns the grid coordinates of a representative point.
      * This point may be used for estimating a {@linkplain GridGeometry#getResolution(boolean) grid resolution}.
@@ -1299,21 +1289,6 @@ public class GridExtent implements GridEnvelope, LenientComparable, Serializable
         return (dimensions != null) ? reorder(dimensions) : this;
     }
 
-    /**
-     * Returns a grid extent that encompass only some dimensions of this grid extent.
-     *
-     * @param  dimensions  the dimensions to select, in strictly increasing order.
-     * @return the sub-envelope, or {@code this} if the given array contains all dimensions of this grid extent.
-     *
-     * @since 1.1
-     *
-     * @deprecated Renamed {@link #selectDimensions(int...)} for clarity.
-     */
-    @Deprecated
-    public GridExtent reduceDimension(int... dimensions) {
-        return selectDimensions(dimensions);
-    }
-
     /**
      * Verifies the validity of a given {@code dimensions} argument.
      *
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
index 81bbfd9a4e..f6a3c507de 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
@@ -134,7 +134,7 @@ import static org.apache.sis.referencing.CRS.findOperation;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Johann Sorel (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.0
  * @module
  */
@@ -1491,22 +1491,6 @@ public class GridGeometry implements LenientComparable, Serializable {
         return new GridGeometry(newExtent, t1, t2, envelope, resolution, nonLinears);
     }
 
-    /**
-     * Returns a grid geometry translated by the given amount of cells compared to this grid.
-     *
-     * @param  translation  translation to apply on each grid axis in order.
-     * @return a grid geometry whose coordinates and the "grid to CRS" transforms have been translated by given amounts.
-     *
-     * @since 1.1
-     *
-     * @deprecated Renamed {@link #shiftGrid(long...)} for making clearer that this method changes
-     *             grid coordinates without changing "real world" coordinates.
-     */
-    @Deprecated
-    public GridGeometry translate(final long... translation) {
-        return shiftGrid(translation);
-    }
-
     /**
      * Returns a grid geometry with the given grid extent, which implies a new "real world" computation.
      * The "grid to CRS" transforms and the resolution stay the same than this {@code GridGeometry}.
@@ -1569,19 +1553,6 @@ public class GridGeometry implements LenientComparable, Serializable {
         return this;
     }
 
-    /**
-     * Returns a grid geometry that encompass only some dimensions of this grid geometry.
-     *
-     * @param  dimensions  the grid (not CRS) dimensions to select, in strictly increasing order.
-     * @return the sub-grid geometry, or {@code this} if the given array contains all dimensions of this grid geometry.
-     *
-     * @deprecated Renamed {@link #selectDimensions(int...)} for clarity and consistency with {@link GridExtent}.
-     */
-    @Deprecated
-    public GridGeometry reduce(int... dimensions) {
-        return selectDimensions(dimensions);
-    }
-
     /**
      * Creates a one-, two- or three-dimensional coordinate reference system for cell indices in the grid.
      * This method returns a CRS which is derived from the "real world" CRS or a subset of it.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/package-info.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/package-info.java
index c97ab867d7..e746986cdf 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/package-info.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/package-info.java
@@ -41,7 +41,7 @@
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Johann Sorel (Geomatys)
  * @author  Alexis Manin (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.0
  * @module
  */
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
index 55c894610d..ceebb7e042 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
@@ -128,7 +128,7 @@ import org.apache.sis.util.UnknownNameException;
  * @author  Guilhem Legal (Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  *
  * @see DefaultMemberName
  * @see DefaultNameFactory
@@ -263,21 +263,6 @@ public class DefaultTypeName extends DefaultLocalName implements TypeName {
         return Optional.ofNullable(javaType);
     }
 
-    /**
-     * Returns the Java class associated to this type name.
-     *
-     * @deprecated Replaced by {@link #toJavaType()}.
-     *
-     * @return the Java class associated to this {@code TypeName},
-     *         or {@code null} if there is no mapping from this name to a Java class.
-     *
-     * @since 0.5
-     */
-    @Deprecated
-    public Class<?> toClass() {
-        return (javaType instanceof Class<?>) ? (Class<?>) javaType : null;
-    }
-
     /**
      * Compares this type name with the specified object for equality.
      *
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/package-info.java b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/package-info.java
index 105afcdbb4..12359b7ae1 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/util/iso/package-info.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/util/iso/package-info.java
@@ -99,7 +99,7 @@
  * </table>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   0.3
  * @module
  */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
index 6d50ab6fff..b576e8d34a 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/CRS.java
@@ -142,7 +142,7 @@ import org.opengis.geometry.Geometry;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Alexis Manin (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   0.3
  * @module
  */
@@ -988,24 +988,6 @@ public final class CRS extends Static {
         return compound(components.toArray(new CoordinateReferenceSystem[components.size()]));
     }
 
-    /**
-     * Gets or creates a coordinate reference system with a subset of the dimensions of the given CRS.
-     *
-     * @param  crs         the CRS to reduce the dimensionality.
-     * @param  dimensions  the dimensions to retain.
-     * @return a coordinate reference system for the given dimensions.
-     * @throws FactoryException if the geodetic factory failed to create a compound CRS.
-     *
-     * @since 1.0
-     *
-     * @deprecated Renamed {@link #selectDimensions(CoordinateReferenceSystem, int...)} for clarity and consistency with
-     *             {@link org.apache.sis.coverage.grid.GridExtent} and {@link org.apache.sis.coverage.grid.GridGeometry}.
-     */
-    @Deprecated
-    public static CoordinateReferenceSystem reduce(final CoordinateReferenceSystem crs, final int... dimensions) throws FactoryException {
-        return selectDimensions(crs, dimensions);
-    }
-
     /**
      * Adds the components of reduced CRS into the given list.
      * This method may invoke itself recursively for walking through compound CRS.
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
index f04b6a54c5..3c941a2cd0 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/DefaultMathTransformFactory.java
@@ -170,7 +170,7 @@ import static java.util.logging.Logger.getLogger;
  * There is typically only one {@code MathTransformFactory} instance for the whole application.
  *
  * @author  Martin Desruisseaux (Geomatys, IRD)
- * @version 1.3
+ * @version 1.4
  *
  * @see MathTransformProvider
  * @see AbstractMathTransform
@@ -620,29 +620,6 @@ public class DefaultMathTransformFactory extends AbstractFactory implements Math
             sourceEllipsoid = null;
         }
 
-        /**
-         * Sets the source coordinate system and its associated ellipsoid to the given value.
-         *
-         * <div class="note"><b>Design note:</b>
-         * ellipsoidal coordinate systems and ellipsoids are associated indirectly, through a geodetic CRS.
-         * However, this method expects those two components to be given explicitly instead of inferring
-         * them from a {@code CoordinateReferenceSystem} for making clear that {@code MathTransformFactory}
-         * does not perform any {@linkplain org.apache.sis.referencing.datum.DefaultGeodeticDatum geodetic
-         * datum} analysis. For coordinate operations that take datum changes in account (including change
-         * of prime meridian), see {@link org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory}.
-         * This policy helps to enforce a separation of concerns.</div>
-         *
-         * @param  cs         the coordinate system to set as the source, or {@code null}.
-         * @param  ellipsoid  the ellipsoid associated to the given coordinate system, or {@code null}.
-         *
-         * @deprecated Replaced by {@link #setSource(GeodeticCRS)}.
-         */
-        @Deprecated
-        public void setSource(final EllipsoidalCS cs, final Ellipsoid ellipsoid) {
-            sourceCS = cs;
-            sourceEllipsoid = ellipsoid;
-        }
-
         /**
          * Sets the source coordinate system and related ellipsoid to the components of given CRS.
          * The {@link Ellipsoid}, fetched from the geodetic datum, is often used together with an {@link EllipsoidalCS},
@@ -677,23 +654,6 @@ public class DefaultMathTransformFactory extends AbstractFactory implements Math
             targetEllipsoid = null;
         }
 
-        /**
-         * Sets the target coordinate system and its associated ellipsoid to the given value.
-         *
-         * <div class="note"><b>Design note:</b>
-         * see {@link #setSource(EllipsoidalCS, Ellipsoid)}.</div>
-         *
-         * @param  cs         the coordinate system to set as the source, or {@code null}.
-         * @param  ellipsoid  the ellipsoid associated to the given coordinate system, or {@code null}.
-         *
-         * @deprecated Replaced by {@link #setTarget(GeodeticCRS)}.
-         */
-        @Deprecated
-        public void setTarget(final EllipsoidalCS cs, final Ellipsoid ellipsoid) {
-            targetCS = cs;
-            targetEllipsoid = ellipsoid;
-        }
-
         /**
          * Sets the target coordinate system and related ellipsoid to the components of given CRS.
          * The {@link Ellipsoid}, fetched from the geodetic datum, is often used together with an {@link EllipsoidalCS},
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
index f542790cb2..c74a54f84e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/package-info.java
@@ -61,7 +61,7 @@
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Adrian Custer (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   0.5
  * @module
  */
diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
index a5a1b17e80..2a78db869e 100644
--- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
+++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/package-info.java
@@ -94,7 +94,7 @@
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Guilhem Legal (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   0.4
  * @module
  */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
index a912f08279..d084c55486 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/PerformanceLevel.java
@@ -51,7 +51,7 @@ import org.apache.sis.util.resources.Vocabulary;
  * </ul>
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   0.3
  * @module
  */
@@ -78,12 +78,6 @@ public final class PerformanceLevel extends Level {
      */
     public static final PerformanceLevel SLOWER = new PerformanceLevel("SLOWER", Vocabulary.Keys.Slower, 630, 10_000_000_000L);
 
-    /**
-     * @deprecated Renamed {@link #SLOWNESS}.
-     */
-    @Deprecated
-    public static final PerformanceLevel SLOW = SLOWNESS;
-
     /**
      * The minimal duration (in nanoseconds) for logging the record.
      */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java
index c440863cc8..e165fe3a5e 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/package-info.java
@@ -35,7 +35,7 @@
  * {@code jul-to-slf4j.jar} dependency to a project is sufficient for redirecting Java logging to SLF4J.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  *
  * @see <a href="https://docs.oracle.com/en/java/javase/18/core/java-logging-overview.html">Java Logging Overview</a>
  *
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/event/StoreListeners.java b/storage/sis-storage/src/main/java/org/apache/sis/storage/event/StoreListeners.java
index 3202bfa7d5..8e89dbae11 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/storage/event/StoreListeners.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/event/StoreListeners.java
@@ -84,7 +84,7 @@ import org.apache.sis.storage.Resource;
  * from multiple threads.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.0
  * @module
  */
@@ -420,16 +420,6 @@ public class StoreListeners implements Localized {
         return Logging.getLogger(src.getClass());
     }
 
-    /**
-     * @deprecated Renamed {@link #useReadOnlyEvents()}.
-     *
-     * @since 1.2
-     */
-    @Deprecated
-    public void useWarningEventsOnly() {
-        useReadOnlyEvents();
-    }
-
     /**
      * Reports a warning described by the given message.
      *
@@ -617,15 +607,6 @@ public class StoreListeners implements Localized {
         Logging.unexpectedException(Logger.getLogger(Modules.STORAGE), StoreListeners.class, method, error);
     }
 
-    /**
-     * @deprecated Replaced by {@link #fire(Class, StoreEvent)} for consistency with the argument order
-     *             in all other methods of this class.
-     */
-    @Deprecated
-    public <E extends StoreEvent> boolean fire(final E event, final Class<E> eventType) {
-        return fire(eventType, event);
-    }
-
     /**
      * Sends the given event to all listeners registered for the given type or for a super-type.
      * This method first notifies the listeners registered in this {@code StoreListeners}, then
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/event/package-info.java b/storage/sis-storage/src/main/java/org/apache/sis/storage/event/package-info.java
index eb549691b7..83ccdc7756 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/storage/event/package-info.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/event/package-info.java
@@ -35,7 +35,7 @@
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @since   1.3
+ * @since   1.4
  * @version 1.0
  * @module
  */


[sis] 08/08: Delete some placeholder defined in the `JDK9` internal class, now replaced by their standard Java 11 counterparts.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 929bc5d9c1651560fd3ca8595135ca8b2cad28ad
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 17:23:00 2022 +0100

    Delete some placeholder defined in the `JDK9` internal class,
    now replaced by their standard Java 11 counterparts.
---
 .../sis/coverage/grid/BufferedGridCoverage.java    |   3 +-
 .../java/org/apache/sis/image/ImageCombiner.java   |   5 +-
 .../java/org/apache/sis/image/PlanarImage.java     |  15 +--
 .../main/java/org/apache/sis/image/TileCache.java  |   3 +-
 .../sis/internal/coverage/j2d/ImageUtilities.java  |   2 +-
 .../sis/internal/feature/GeometryFactories.java    |   3 +-
 .../internal/processing/image/TiledProcess.java    |   3 +-
 .../gazetteer/MilitaryGridReferenceSystem.java     |   3 +-
 .../provider/ParameterNameTableGenerator.java      |   3 +-
 .../java/org/apache/sis/internal/jdk9/JDK9.java    | 110 +--------------------
 .../org/apache/sis/internal/jdk9/package-info.java |   2 +-
 .../main/java/org/apache/sis/math/Fraction.java    |  13 ++-
 .../java/org/apache/sis/math/MathFunctions.java    |   2 +-
 .../src/main/java/org/apache/sis/math/Vector.java  |   5 +-
 .../src/main/java/org/apache/sis/setup/About.java  |   3 +-
 .../java/org/apache/sis/util/logging/Logging.java  |   3 +-
 .../org/apache/sis/test/ProjectDirectories.java    |   3 +-
 .../storage/inflater/CompressionChannel.java       |   3 +-
 .../sis/storage/geotiff/CompressedSubset.java      |   2 +-
 .../org/apache/sis/storage/geotiff/DataSubset.java |   2 +-
 .../sis/storage/geotiff/ReversedBitsChannel.java   |   2 +-
 .../apache/sis/internal/netcdf/RasterResource.java |   3 +-
 .../sis/internal/sql/postgis/RasterReader.java     |   3 +-
 .../sis/internal/storage/TiledGridCoverage.java    |   2 +-
 .../sis/internal/storage/esri/RawRasterReader.java |   2 +-
 .../apache/sis/internal/storage/io/ByteWriter.java |   5 +-
 .../sis/internal/storage/wkt/FirstKeywordPeek.java |   2 +-
 .../sis/storage/AbstractGridCoverageResource.java  |   3 +-
 .../sis/internal/storage/gpx/UpdaterTest.java      |   2 +-
 29 files changed, 44 insertions(+), 168 deletions(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
index f966cc1a1f..07a0549ee3 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
@@ -39,7 +39,6 @@ import org.apache.sis.util.collection.Cache;
 import org.apache.sis.image.DataType;
 
 // Branch-specific imports
-import org.apache.sis.internal.jdk9.JDK9;
 import org.opengis.coverage.CannotEvaluateException;
 import org.opengis.coverage.PointOutsideCoverageException;
 
@@ -167,7 +166,7 @@ public class BufferedGridCoverage extends GridCoverage {
          */
         final GridExtent extent = domain.getExtent();
         final long expectedSize = getSampleCount(extent, numBands);
-        final long bufferSize = JDK9.multiplyFull(data.getSize(), numBanks);
+        final long bufferSize = Math.multiplyFull(data.getSize(), numBanks);
         if (bufferSize < expectedSize) {
             final StringBuilder b = new StringBuilder();
             for (int i=0; i < extent.getDimension(); i++) {
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/ImageCombiner.java b/core/sis-feature/src/main/java/org/apache/sis/image/ImageCombiner.java
index 2f711ad60e..61f7da9fe9 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/ImageCombiner.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/ImageCombiner.java
@@ -29,7 +29,6 @@ import org.apache.sis.internal.coverage.j2d.ImageLayout;
 import org.apache.sis.internal.coverage.j2d.ImageUtilities;
 import org.apache.sis.internal.coverage.j2d.TileOpExecutor;
 import org.apache.sis.internal.util.Numerics;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.measure.Units;
 
@@ -260,8 +259,8 @@ public class ImageCombiner implements Consumer<RenderedImage> {
         final long tileGridYOffset = destination.getTileGridYOffset();
         final int  minTileX        = Math.toIntExact(Math.floorDiv((bounds.x - tileGridXOffset), tileWidth));
         final int  minTileY        = Math.toIntExact(Math.floorDiv((bounds.y - tileGridYOffset), tileHeight));
-        final int  minX            = Math.toIntExact(JDK9.multiplyFull(minTileX, tileWidth)  + tileGridXOffset);
-        final int  minY            = Math.toIntExact(JDK9.multiplyFull(minTileY, tileHeight) + tileGridYOffset);
+        final int  minX            = Math.toIntExact(Math.multiplyFull(minTileX, tileWidth)  + tileGridXOffset);
+        final int  minY            = Math.toIntExact(Math.multiplyFull(minTileY, tileHeight) + tileGridYOffset);
         /*
          * Expand the target bounds until it contains an integer number of tiles, computed using the size
          * of destination tiles. We have to do that because the resample operation below is not free to
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java b/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java
index 805a8e1dcf..cca4151bfb 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/PlanarImage.java
@@ -36,9 +36,10 @@ import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.coverage.j2d.ImageUtilities;
 import org.apache.sis.internal.coverage.j2d.TileOpExecutor;
 import org.apache.sis.internal.coverage.j2d.ColorModelFactory;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.coverage.grid.GridGeometry;       // For javadoc
 
+import static java.lang.Math.multiplyFull;
+
 
 /**
  * Base class of {@link RenderedImage} implementations in Apache SIS.
@@ -384,7 +385,7 @@ public abstract class PlanarImage implements RenderedImage {
     @Override
     public int getTileGridXOffset() {
         // We may have temporary `int` overflow after multiplication but exact result after addition.
-        return Math.toIntExact(getMinX() - JDK9.multiplyFull(getMinTileX(), getTileWidth()));
+        return Math.toIntExact(getMinX() - multiplyFull(getMinTileX(), getTileWidth()));
     }
 
     /**
@@ -398,7 +399,7 @@ public abstract class PlanarImage implements RenderedImage {
      */
     @Override
     public int getTileGridYOffset() {
-        return Math.toIntExact(getMinY() - JDK9.multiplyFull(getMinTileY(), getTileHeight()));
+        return Math.toIntExact(getMinY() - multiplyFull(getMinTileY(), getTileHeight()));
     }
 
     /**
@@ -576,16 +577,16 @@ public abstract class PlanarImage implements RenderedImage {
             if (sm.getWidth()  < tileWidth)  return "tileWidth";
             if (sm.getHeight() < tileHeight) return "tileHeight";
         }
-        long remainder = JDK9.multiplyFull(getNumXTiles(), tileWidth) - getWidth();
+        long remainder = multiplyFull(getNumXTiles(), tileWidth) - getWidth();
         if (remainder != 0) {
             return (remainder >= 0 && remainder < tileWidth) ? "width" : "numXTiles";
         }
-        remainder = JDK9.multiplyFull(getNumYTiles(), tileHeight) - getHeight();
+        remainder = multiplyFull(getNumYTiles(), tileHeight) - getHeight();
         if (remainder != 0) {
             return (remainder >= 0 && remainder < tileHeight) ? "height" : "numYTiles";
         }
-        if (JDK9.multiplyFull(getMinTileX(), tileWidth)  + getTileGridXOffset() != getMinX()) return "tileX";
-        if (JDK9.multiplyFull(getMinTileY(), tileHeight) + getTileGridYOffset() != getMinY()) return "tileY";
+        if (multiplyFull(getMinTileX(), tileWidth)  + getTileGridXOffset() != getMinX()) return "tileX";
+        if (multiplyFull(getMinTileY(), tileHeight) + getTileGridYOffset() != getMinY()) return "tileY";
         return null;
     }
 
diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/TileCache.java b/core/sis-feature/src/main/java/org/apache/sis/image/TileCache.java
index d009045eef..817a82cbfd 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/image/TileCache.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/image/TileCache.java
@@ -23,7 +23,6 @@ import java.lang.ref.Reference;
 import org.apache.sis.util.collection.Cache;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.feature.Resources;
-import org.apache.sis.internal.jdk9.JDK9;
 
 
 /**
@@ -69,7 +68,7 @@ final class TileCache extends Cache<TileCache.Key, Raster> {
      */
     @Override
     protected int cost​(final Raster tile) {
-        long numBits = JDK9.multiplyFull(tile.getWidth(), tile.getHeight()) * tile.getNumBands();
+        long numBits = Math.multiplyFull(tile.getWidth(), tile.getHeight()) * tile.getNumBands();
         final DataBuffer buffer = tile.getDataBuffer();
         if (buffer != null) try {
             numBits *= DataBuffer.getDataTypeSize(buffer.getDataType());
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ImageUtilities.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ImageUtilities.java
index a1c1f60632..e76d3602fd 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ImageUtilities.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ImageUtilities.java
@@ -42,8 +42,8 @@ import static java.lang.Math.rint;
 import static java.lang.Math.floorDiv;
 import static java.lang.Math.addExact;
 import static java.lang.Math.toIntExact;
+import static java.lang.Math.multiplyFull;
 import static java.util.logging.Logger.getLogger;
-import static org.apache.sis.internal.jdk9.JDK9.multiplyFull;
 import static org.apache.sis.internal.util.Numerics.COMPARISON_THRESHOLD;
 
 
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryFactories.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryFactories.java
index 6b8037ebae..c1e28d6fac 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryFactories.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryFactories.java
@@ -18,7 +18,6 @@ package org.apache.sis.internal.feature;
 
 import java.util.logging.Level;
 import java.util.logging.LogRecord;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.util.logging.Logging;
 
@@ -56,7 +55,7 @@ final class GeometryFactories {
      * The last registered library will be the default implementation.
      */
     private static Geometries<?> link(final Geometries<?> previous, final String name) {
-        final String classname = JDK9.getPackageName(GeometryFactories.class) + '.' + name + ".Factory";
+        final String classname = GeometryFactories.class.getPackageName() + '.' + name + ".Factory";
         final Geometries<?> factory;
         try {
             factory = (Geometries<?>) Class.forName(classname).getField("INSTANCE").get(null);
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java
index 662128f09b..326c7ea4a6 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/TiledProcess.java
@@ -24,7 +24,6 @@ import java.util.concurrent.locks.ReentrantLock;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.sis.internal.system.CommonExecutor;
 import org.apache.sis.internal.util.Numerics;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.image.PixelIterator;
 import org.apache.sis.util.ArgumentChecks;
 
@@ -153,7 +152,7 @@ public abstract class TiledProcess<R> {
         final int height = data.getHeight();
         int  numTileX = Math.max(width  / MIN_TILE_SIZE, 1);
         int  numTileY = Math.max(height / MIN_TILE_SIZE, 1);
-        long numTiles = JDK9.multiplyFull(numTileX, numTileY);
+        long numTiles = Math.multiplyFull(numTileX, numTileY);
         if (numTiles > CommonExecutor.PARALLELISM) {
             final double r = Math.sqrt(CommonExecutor.PARALLELISM / (double) numTiles);     // Always < 1.
             if (numTileX >= numTileY) {
diff --git a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
index 38a484c4ff..d80d5ca66d 100644
--- a/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
+++ b/core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/MilitaryGridReferenceSystem.java
@@ -83,7 +83,6 @@ import org.apache.sis.measure.Units;
 import static java.util.logging.Logger.getLogger;
 
 // Branch-dependent imports
-import org.apache.sis.internal.jdk9.JDK9;
 import org.opengis.metadata.citation.Party;
 import org.opengis.referencing.gazetteer.Location;
 import org.opengis.referencing.gazetteer.LocationType;
@@ -1294,7 +1293,7 @@ public class MilitaryGridReferenceSystem extends ReferencingByIdentifiers {
          */
         @Override
         public long estimateSize() {
-            return (xEnd - (long) gridX) * Math.abs(yEnd - (long) yStart) / JDK9.multiplyFull(step, step);
+            return (xEnd - (long) gridX) * Math.abs(yEnd - (long) yStart) / Math.multiplyFull(step, step);
         }
 
         /**
diff --git a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ParameterNameTableGenerator.java b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ParameterNameTableGenerator.java
index 5bb278871d..1d2ed9047e 100644
--- a/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ParameterNameTableGenerator.java
+++ b/core/sis-referencing/src/test/java/org/apache/sis/internal/referencing/provider/ParameterNameTableGenerator.java
@@ -32,7 +32,6 @@ import org.opengis.metadata.Identifier;
 import org.apache.sis.referencing.NamedIdentifier;
 import org.apache.sis.parameter.DefaultParameterDescriptor;
 import org.apache.sis.test.ProjectDirectories;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.measure.Angle;
 import org.apache.sis.measure.Latitude;
 import org.apache.sis.measure.Longitude;
@@ -142,7 +141,7 @@ public final class ParameterNameTableGenerator extends SimpleFileVisitor<Path> {
     private Class<?> getClass(final Path file) throws ClassNotFoundException {
         String name = file.getFileName().toString();
         name = name.substring(0, name.lastIndexOf('.'));    // Remove the ".java" suffix.
-        name = JDK9.getPackageName(getClass()) + '.' + name;
+        name = getClass().getPackageName() + '.' + name;
         return Class.forName(name);
     }
 
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java b/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java
index 047b6f326b..8d89029b27 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/JDK9.java
@@ -16,16 +16,7 @@
  */
 package org.apache.sis.internal.jdk9;
 
-import java.io.IOException;
-import java.nio.Buffer;
 import java.nio.ByteBuffer;
-import java.nio.DoubleBuffer;
-import java.nio.FloatBuffer;
-import java.nio.IntBuffer;
-import java.nio.LongBuffer;
-import java.nio.ShortBuffer;
-import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.Arrays;
 import java.util.Set;
 import java.util.List;
@@ -34,9 +25,6 @@ import java.util.HashSet;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
-import java.util.Optional;
-import java.util.StringJoiner;
-import java.util.function.Consumer;
 import java.util.stream.Stream;
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.internal.util.UnmodifiableArrayList;
@@ -47,7 +35,7 @@ import org.apache.sis.internal.util.UnmodifiableArrayList;
  * This file will be deleted on the SIS JDK9 branch.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @since   1.1
+ * @since   1.4
  * @version 0.8
  * @module
  */
@@ -58,33 +46,6 @@ public final class JDK9 {
     private JDK9() {
     }
 
-    /**
-     * Placeholder for {@link Optional#ifPresentOrElse(Consumer, Runnable)}.
-     */
-    public static <T> void ifPresentOrElse(Optional<T> optional, Consumer<? super T> action, Runnable emptyAction) {
-        if (optional.isPresent()) {
-            action.accept(optional.get());
-        } else {
-            emptyAction.run();
-        }
-    }
-
-    /**
-     * Placeholder for {@code List.of(...)}.
-     *
-     * @param  <E>       type of elements.
-     * @param  elements  the elements to put in an unmodifiable list.
-     * @return an unmodifiable list of the given elements.
-     */
-    @SafeVarargs
-    public static <E> List<E> listOf(final E... elements) {
-        switch (elements.length) {
-            case 0:  return Collections.emptyList();
-            case 1:  return Collections.singletonList(elements[0]);
-            default: return UnmodifiableArrayList.wrap(elements);
-        }
-    }
-
     /**
      * Placeholder for {@code Set.of(...)}.
      *
@@ -136,38 +97,6 @@ public final class JDK9 {
         return map.size() < 2 ? CollectionsExt.compact(map) : new HashMap<>(map);
     }
 
-    /**
-     * Place holder for {@code Buffer.slice()}.
-     *
-     * @param  b the buffer to slice.
-     * @return the sliced buffer.
-     */
-    public static Buffer slice(Buffer b) {
-        if (b instanceof ByteBuffer)   return ((ByteBuffer) b).slice();
-        if (b instanceof ShortBuffer)  return ((ShortBuffer) b).slice();
-        if (b instanceof IntBuffer)    return ((IntBuffer) b).slice();
-        if (b instanceof LongBuffer)   return ((LongBuffer) b).slice();
-        if (b instanceof FloatBuffer)  return ((FloatBuffer) b).slice();
-        if (b instanceof DoubleBuffer) return ((DoubleBuffer) b).slice();
-        throw new IllegalArgumentException();
-    }
-
-    /**
-     * Place holder for {@code Buffer.duplicate()}.
-     *
-     * @param  b the buffer to duplicate.
-     * @return the duplicate buffer.
-     */
-    public static Buffer duplicate(Buffer b) {
-        if (b instanceof ByteBuffer)   return ((ByteBuffer) b).duplicate();
-        if (b instanceof ShortBuffer)  return ((ShortBuffer) b).duplicate();
-        if (b instanceof IntBuffer)    return ((IntBuffer) b).duplicate();
-        if (b instanceof LongBuffer)   return ((LongBuffer) b).duplicate();
-        if (b instanceof FloatBuffer)  return ((FloatBuffer) b).duplicate();
-        if (b instanceof DoubleBuffer) return ((DoubleBuffer) b).duplicate();
-        throw new IllegalArgumentException();
-    }
-
     /**
      * Place holder for {@code ByteBuffer.get(int, byte[])}.
      *
@@ -194,34 +123,6 @@ public final class JDK9 {
         }
     }
 
-    /**
-     * Place holder for {@code Class.getPackageName()}.
-     *
-     * @param  c  the class for which to get the package name.
-     * @return the name of the package.
-     */
-    public static String getPackageName(Class<?> c) {
-        Class<?> outer;
-        while ((outer = c.getEnclosingClass()) != null) {
-            c = outer;
-        }
-        String name = c.getName();
-        final int separator = name.lastIndexOf('.');
-        name = (separator >= 1) ? name.substring(0, separator) : "";
-        return name;
-    }
-
-    /**
-     * Place holder for {@code Math.multiplyFull​(int, int)}.
-     *
-     * @param  x  the first value.
-     * @param  y  the second value.
-     * @return Product of the two values.
-     */
-    public static long multiplyFull​(int x, int y) {
-        return ((long) x) * ((long) y);
-    }
-
     /**
      * Place holder for {@link java.util.Arrays} method added in JDK9.
      * This placeholder does not perform range check (JDK9 method does).
@@ -354,13 +255,4 @@ public final class JDK9 {
     public static <T> List<T> toList(final Stream<T> s) {
         return (List<T>) UnmodifiableArrayList.wrap(s.toArray());
     }
-
-    /**
-     * Placeholder for {@link Files#readString(Path)}.
-     */
-    public static String readString(final Path path) throws IOException {
-        final StringJoiner j = new StringJoiner("\n");
-        Files.readAllLines(path).forEach(j::add);
-        return j.toString();
-    }
 }
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/package-info.java
index 2409866171..72b87f3ba7 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/package-info.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/jdk9/package-info.java
@@ -24,7 +24,7 @@
  * may change in incompatible ways in any future version without notice.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @since   1.2
+ * @since   1.4
  * @version 0.8
  * @module
  */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java b/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
index f2f086897d..9dddc00600 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java
@@ -21,7 +21,6 @@ import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.collection.WeakHashSet;
 import org.apache.sis.internal.util.Numerics;
-import org.apache.sis.internal.jdk9.JDK9;
 
 
 /**
@@ -320,8 +319,8 @@ public final class Fraction extends Number implements Comparable<Fraction>, Seri
      * @throws ArithmeticException if the result overflows.
      */
     public Fraction multiply(final Fraction other) {
-        return simplify(this, JDK9.multiplyFull(numerator,   other.numerator),
-                              JDK9.multiplyFull(denominator, other.denominator));
+        return simplify(this, Math.multiplyFull(numerator,   other.numerator),
+                              Math.multiplyFull(denominator, other.denominator));
     }
 
     /**
@@ -332,8 +331,8 @@ public final class Fraction extends Number implements Comparable<Fraction>, Seri
      * @throws ArithmeticException if the result overflows.
      */
     public Fraction divide(final Fraction other) {
-        return simplify(this, JDK9.multiplyFull(numerator,   other.denominator),
-                              JDK9.multiplyFull(denominator, other.numerator));
+        return simplify(this, Math.multiplyFull(numerator,   other.denominator),
+                              Math.multiplyFull(denominator, other.numerator));
     }
 
     /**
@@ -507,8 +506,8 @@ public final class Fraction extends Number implements Comparable<Fraction>, Seri
      */
     @Override
     public int compareTo(final Fraction other) {
-        return Long.signum(JDK9.multiplyFull(numerator, other.denominator)
-                         - JDK9.multiplyFull(other.numerator, denominator));
+        return Long.signum(Math.multiplyFull(numerator, other.denominator)
+                         - Math.multiplyFull(other.numerator, denominator));
     }
 
     /**
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java b/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
index dd7cdd3720..09fe2d2dc9 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/MathFunctions.java
@@ -25,13 +25,13 @@ import org.apache.sis.internal.util.DoubleDouble;
 
 import static java.lang.Math.abs;
 import static java.lang.Math.sqrt;
+import static java.lang.Math.multiplyFull;
 import static java.lang.Float.intBitsToFloat;
 import static java.lang.Float.floatToIntBits;
 import static java.lang.Float.floatToRawIntBits;
 import static java.lang.Double.longBitsToDouble;
 import static java.lang.Double.doubleToLongBits;
 import static java.lang.Double.doubleToRawLongBits;
-import static org.apache.sis.internal.jdk9.JDK9.multiplyFull;
 import static org.apache.sis.internal.util.Numerics.SIGN_BIT_MASK;
 import static org.apache.sis.internal.util.Numerics.SIGNIFICAND_SIZE;
 
diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java b/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
index 252bf05812..759d58d1ec 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/math/Vector.java
@@ -24,7 +24,6 @@ import java.util.RandomAccess;
 import java.util.StringJoiner;
 import java.util.Optional;
 import java.util.function.IntSupplier;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.measure.NumberRange;
 import org.apache.sis.util.Numbers;
 import org.apache.sis.util.ArraysExt;
@@ -92,7 +91,7 @@ import static org.apache.sis.util.ArgumentChecks.ensureValidIndex;
  * method and by accepting buffer in the {@link #create(Object, boolean)} method.</div>
  *
  * @author  Martin Desruisseaux (MPO, Geomatys)
- * @version 1.1
+ * @version 1.4
  *
  * @see org.apache.sis.util.collection.IntegerList
  *
@@ -1076,7 +1075,7 @@ search:     for (;;) {
         @Override
         public Optional<Buffer> buffer() {
             if (step == 1) {
-                Vector.this.buffer().map((b) -> JDK9.slice(b.position(first).limit(first + length)));
+                Vector.this.buffer().map((b) -> b.position(first).limit(first + length).slice());
             }
             return super.buffer();
         }
diff --git a/core/sis-utility/src/main/java/org/apache/sis/setup/About.java b/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
index 67ed4f580e..021675162d 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/setup/About.java
@@ -56,7 +56,6 @@ import org.apache.sis.internal.system.Loggers;
 import org.apache.sis.internal.system.Modules;
 import org.apache.sis.internal.system.Shutdown;
 import org.apache.sis.internal.system.DataDirectory;
-import org.apache.sis.internal.jdk9.JDK9;
 
 import static java.lang.System.getProperty;
 import static java.util.logging.Logger.getLogger;
@@ -351,7 +350,7 @@ fill:   for (int i=0; ; i++) {
                         nameKey = Vocabulary.Keys.Implementation;
                         value = "java.util.logging";
                         for (final Handler handler : getLogger("").getHandlers()) {
-                            final String c = JDK9.getPackageName(handler.getClass());
+                            final String c = handler.getClass().getPackageName();
                             if (!value.equals(c)) {
                                 value = c;
                                 break;
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java b/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
index da0e3fb8a4..11d77db468 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
@@ -24,7 +24,6 @@ import org.apache.sis.util.ArgumentChecks;
 import org.apache.sis.util.Static;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.Classes;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.internal.system.Modules;
 
 
@@ -75,7 +74,7 @@ public final class Logging extends Static {
      */
     public static Logger getLogger(final Class<?> source) {
         ArgumentChecks.ensureNonNull("source", source);
-        String name = JDK9.getPackageName(source);
+        String name = source.getPackageName();
         if (name.startsWith(Modules.INTERNAL_CLASSNAME_PREFIX)) {
             // Remove the "internal" part from Apache SIS package names.
             name = Modules.CLASSNAME_PREFIX + name.substring(Modules.INTERNAL_CLASSNAME_PREFIX.length());
diff --git a/core/sis-utility/src/test/java/org/apache/sis/test/ProjectDirectories.java b/core/sis-utility/src/test/java/org/apache/sis/test/ProjectDirectories.java
index edcfbcd7ee..ea3e14b4bd 100644
--- a/core/sis-utility/src/test/java/org/apache/sis/test/ProjectDirectories.java
+++ b/core/sis-utility/src/test/java/org/apache/sis/test/ProjectDirectories.java
@@ -22,7 +22,6 @@ import java.net.URISyntaxException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
-import org.apache.sis.internal.jdk9.JDK9;
 
 import static org.junit.Assert.*;
 
@@ -76,7 +75,7 @@ public final class ProjectDirectories {
             throw new AssertionError(e);
         }
         classesPackageDirectory = dir;
-        packageName = JDK9.getPackageName(c);
+        packageName = c.getPackageName();
         String pkg = packageName;
         int s = pkg.length();
         do {
diff --git a/storage/sis-geotiff/src/main/java/org/apache/sis/internal/storage/inflater/CompressionChannel.java b/storage/sis-geotiff/src/main/java/org/apache/sis/internal/storage/inflater/CompressionChannel.java
index 0cf98be80a..48c2a936bd 100644
--- a/storage/sis-geotiff/src/main/java/org/apache/sis/internal/storage/inflater/CompressionChannel.java
+++ b/storage/sis-geotiff/src/main/java/org/apache/sis/internal/storage/inflater/CompressionChannel.java
@@ -117,8 +117,7 @@ abstract class CompressionChannel extends PixelChannel {
         } else {
             capacity = Numerics.ceilDiv(BUFFER_SIZE, scanlineStride) * scanlineStride;      // ≥ BUFFER_SIZE
         }
-        // TODO: remove cast with JDK9.
-        final ByteBuffer buffer = (ByteBuffer) ByteBuffer.allocate(capacity).order(input.buffer.order()).limit(0);
+        final ByteBuffer buffer = ByteBuffer.allocate(capacity).order(input.buffer.order()).limit(0);
         return new ChannelDataInput(input.filename, channel, buffer, true);
     }
 
diff --git a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CompressedSubset.java b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CompressedSubset.java
index 2566aac94e..da4c249afe 100644
--- a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CompressedSubset.java
+++ b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/CompressedSubset.java
@@ -28,7 +28,7 @@ import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.image.DataType;
 
 import static java.lang.Math.toIntExact;
-import static org.apache.sis.internal.jdk9.JDK9.multiplyFull;
+import static java.lang.Math.multiplyFull;
 
 
 /**
diff --git a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/DataSubset.java b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/DataSubset.java
index 7a6c9659bb..c885ac88cc 100644
--- a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/DataSubset.java
+++ b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/DataSubset.java
@@ -45,7 +45,7 @@ import org.apache.sis.math.Vector;
 import static java.lang.Math.addExact;
 import static java.lang.Math.subtractExact;
 import static java.lang.Math.multiplyExact;
-import static org.apache.sis.internal.jdk9.JDK9.multiplyFull;
+import static java.lang.Math.multiplyFull;
 import static org.apache.sis.internal.util.Numerics.ceilDiv;
 import static java.lang.Math.toIntExact;
 
diff --git a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ReversedBitsChannel.java b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ReversedBitsChannel.java
index 5258289181..890d82ff2b 100644
--- a/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ReversedBitsChannel.java
+++ b/storage/sis-geotiff/src/main/java/org/apache/sis/storage/geotiff/ReversedBitsChannel.java
@@ -68,7 +68,7 @@ final class ReversedBitsChannel implements ReadableByteChannel, SeekableByteChan
     static ChannelDataInput wrap(final ChannelDataInput input) throws IOException {
         final ChannelDataInput output = new ChannelDataInput(
                 input.filename, new ReversedBitsChannel(input),
-                (ByteBuffer) ByteBuffer.allocate(2048).order(input.buffer.order()).limit(0), true);     // TODO! remove cast widh JDK9.
+                ByteBuffer.allocate(2048).order(input.buffer.order()).limit(0), true);
         output.setStreamPosition(input.getStreamPosition());
         return output;
     }
diff --git a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/RasterResource.java b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/RasterResource.java
index 3c588ae4a5..5aeec3d323 100644
--- a/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/RasterResource.java
+++ b/storage/sis-netcdf/src/main/java/org/apache/sis/internal/netcdf/RasterResource.java
@@ -54,7 +54,6 @@ import org.apache.sis.util.Numbers;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.resources.Vocabulary;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.internal.storage.MetadataBuilder;
 import org.apache.sis.internal.storage.RangeArgument;
 import org.apache.sis.internal.storage.StoreResource;
@@ -706,7 +705,7 @@ public final class RasterResource extends AbstractGridCoverageResource implement
                 sampleValues = new Buffer[bands.length];
                 for (int i=0; i<sampleValues.length; i++) {
                     if (i != 0) {
-                        values = JDK9.duplicate(values);
+                        values = values.duplicate();
                         final int p = values.limit();
                         values.position(p).limit(Math.addExact(p, stride));
                     }
diff --git a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/postgis/RasterReader.java b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/postgis/RasterReader.java
index 3610640ecd..79fb6620f7 100644
--- a/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/postgis/RasterReader.java
+++ b/storage/sis-sqlstore/src/main/java/org/apache/sis/internal/sql/postgis/RasterReader.java
@@ -50,7 +50,6 @@ import org.apache.sis.internal.storage.io.ChannelDataInput;
 import org.apache.sis.internal.sql.feature.InfoStatements;
 import org.apache.sis.internal.util.Constants;
 import org.apache.sis.internal.util.Numerics;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.measure.NumberRange;
 import org.apache.sis.referencing.CRS;
 import org.apache.sis.math.Vector;
@@ -239,7 +238,7 @@ public final class RasterReader extends RasterFormat {
                  */
                 final int sampleSize  = band.getDataTypeSize();                 // In bits: 1, 2, 4, 8, 16, 32 or 64.
                 final int elementSize = DataBuffer.getDataTypeSize(dataType);   // Same as above except for 1, 2, 4.
-                final int length = Math.toIntExact(Numerics.ceilDiv(JDK9.multiplyFull(width, height) * sampleSize, elementSize));
+                final int length = Math.toIntExact(Numerics.ceilDiv(Math.multiplyFull(width, height) * sampleSize, elementSize));
                 final Object data;
                 switch (dataType & ~OPPOSITE_SIGN) {
                     case DataBuffer.TYPE_USHORT:
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java
index 0f8886dfb8..6139640d22 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/TiledGridCoverage.java
@@ -42,12 +42,12 @@ import org.apache.sis.util.resources.Errors;
 import static java.lang.Math.addExact;
 import static java.lang.Math.subtractExact;
 import static java.lang.Math.multiplyExact;
+import static java.lang.Math.multiplyFull;
 import static java.lang.Math.incrementExact;
 import static java.lang.Math.decrementExact;
 import static java.lang.Math.toIntExact;
 import static java.lang.Math.floorDiv;
 import static org.apache.sis.internal.util.Numerics.ceilDiv;
-import static org.apache.sis.internal.jdk9.JDK9.multiplyFull;
 
 
 /**
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/RawRasterReader.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/RawRasterReader.java
index 34df0ceeda..b2d0e07475 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/RawRasterReader.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/esri/RawRasterReader.java
@@ -41,10 +41,10 @@ import org.apache.sis.util.ArraysExt;
 import static java.lang.Math.floorDiv;
 import static java.lang.Math.addExact;
 import static java.lang.Math.multiplyExact;
+import static java.lang.Math.multiplyFull;
 import static java.lang.Math.incrementExact;
 import static org.apache.sis.internal.util.Numerics.ceilDiv;
 import static org.apache.sis.internal.util.Numerics.wholeDiv;
-import static org.apache.sis.internal.jdk9.JDK9.multiplyFull;
 
 
 /**
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ByteWriter.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ByteWriter.java
index d0124cb7f2..ffa41c3963 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ByteWriter.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ByteWriter.java
@@ -25,7 +25,6 @@ import java.nio.IntBuffer;
 import java.nio.LongBuffer;
 import java.nio.ShortBuffer;
 import org.apache.sis.math.Vector;
-import org.apache.sis.internal.jdk9.JDK9;
 
 
 /**
@@ -35,7 +34,7 @@ import org.apache.sis.internal.jdk9.JDK9;
  * can be invoked in a loop until all data have been transferred.
  *
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.0
+ * @version 1.4
  * @since   1.0
  * @module
  */
@@ -72,7 +71,7 @@ public abstract class ByteWriter {
      */
     public static ByteWriter create(Buffer source, final ByteBuffer target) {
         if (source.limit() != source.capacity()) {
-            source = JDK9.slice(source);
+            source = source.slice();
         }
         if (source instanceof DoubleBuffer) return new Doubles ((DoubleBuffer) source, target);
         if (source instanceof  FloatBuffer) return new Floats  ( (FloatBuffer) source, target);
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/FirstKeywordPeek.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/FirstKeywordPeek.java
index 6409ca8a0e..3d33518b65 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/FirstKeywordPeek.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/wkt/FirstKeywordPeek.java
@@ -198,7 +198,7 @@ public abstract class FirstKeywordPeek {
                 do n = channel.read(buffer);
                 while (n >= 0 && buffer.hasRemaining());
             }
-            return probeContent((ByteBuffer) buffer.flip().mark(), null);        // TODO: remove cast in JDK9.
+            return probeContent(buffer.flip().mark(), null);
         } catch (IOException e) {
             throw new DataStoreException(e);
         }
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/storage/AbstractGridCoverageResource.java b/storage/sis-storage/src/main/java/org/apache/sis/storage/AbstractGridCoverageResource.java
index 7dfa30e160..eaff3f97f2 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/storage/AbstractGridCoverageResource.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/storage/AbstractGridCoverageResource.java
@@ -38,7 +38,6 @@ import org.apache.sis.measure.AngleFormat;
 import org.apache.sis.util.logging.PerformanceLevel;
 import org.apache.sis.internal.storage.io.IOUtilities;
 import org.apache.sis.internal.util.StandardDateFormat;
-import org.apache.sis.internal.jdk9.JDK9;
 import org.apache.sis.internal.storage.MetadataBuilder;
 import org.apache.sis.internal.storage.Resources;
 
@@ -198,7 +197,7 @@ public abstract class AbstractGridCoverageResource extends AbstractResource impl
             final Object[] parameters = new Object[6];
             parameters[0] = IOUtilities.filename(file != null ? file : listeners.getSourceName());
             parameters[5] = nanos / (double) StandardDateFormat.NANOS_PER_SECOND;
-            JDK9.ifPresentOrElse(domain.getGeographicExtent(), (box) -> {
+            domain.getGeographicExtent().ifPresentOrElse((box) -> {
                 final AngleFormat f = new AngleFormat(locale);
                 double min = box.getSouthBoundLatitude();
                 double max = box.getNorthBoundLatitude();
diff --git a/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/UpdaterTest.java b/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/UpdaterTest.java
index 8f2fc1b77e..9f5ce3d2dc 100644
--- a/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/UpdaterTest.java
+++ b/storage/sis-xmlstore/src/test/java/org/apache/sis/internal/storage/gpx/UpdaterTest.java
@@ -175,7 +175,7 @@ public final strictfp class UpdaterTest extends TestCase {
      * Also checks some invariants such as the presence of metadata.
      */
     private boolean containsLat20() throws IOException {
-        final String xml = org.apache.sis.internal.jdk9.JDK9.readString(file);
+        final String xml = Files.readString(file);
         assertTrue(xml.contains("<bounds "));       // Sentinel value for presence of metadata.
         return xml.contains("lat=\"20");            // May have trailing ".0".
     }


[sis] 01/08: Post-release cleanup.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 123f05ebc0ba5b76d205b840fe1e68446755990d
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 14:04:39 2022 +0100

    Post-release cleanup.
---
 application/sis-javafx/src/main/artifact/README                |  4 ++--
 application/sis-javafx/src/main/artifact/bin/sis               |  2 +-
 application/sis-javafx/src/main/artifact/bin/sis.bat           |  2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx             |  2 +-
 application/sis-javafx/src/main/artifact/bin/sisfx.bat         |  2 +-
 .../src/main/java/org/apache/sis/internal/book/Assembler.java  | 10 +++++-----
 .../main/java/org/apache/sis/internal/book/package-info.java   |  4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/application/sis-javafx/src/main/artifact/README b/application/sis-javafx/src/main/artifact/README
index 4f18b53f88..e6f159db15 100644
--- a/application/sis-javafx/src/main/artifact/README
+++ b/application/sis-javafx/src/main/artifact/README
@@ -17,8 +17,8 @@ For developing applications using the SIS library or for using on command-line,
 the only requirement is Java 8 or later. For launching the desktop application,
 requirements are Java 16 or later and JavaFX 13 or later.
 
-1) Unzip `apache-sis-1.3-bin.zip` in any directory.
-2) Add the `apache-sis-1.3/bin` directory to the path.
+1) Unzip `apache-sis-1.4-bin.zip` in any directory.
+2) Add the `apache-sis-1.4/bin` directory to the path.
 3) Invoke `sis` or `sisfx` on the command line.
 
 
diff --git a/application/sis-javafx/src/main/artifact/bin/sis b/application/sis-javafx/src/main/artifact/bin/sis
index f91aaab288..111845cfd5 100755
--- a/application/sis-javafx/src/main/artifact/bin/sis
+++ b/application/sis-javafx/src/main/artifact/bin/sis
@@ -27,4 +27,4 @@ java -classpath "$BASE_DIR/lib/sis-console-2.0-SNAPSHOT.jar" \
      -Djava.util.logging.config.class="org.apache.sis.util.logging.Initializer" \
      -Djava.util.logging.config.file="$BASE_DIR/conf/logging.properties" \
      -Dderby.stream.error.file="$BASE_DIR/log/derby.log" \
-     org.apache.sis.console.Command $SIS_OPTS "$@"
+     $JAVA_OPTS org.apache.sis.console.Command $SIS_OPTS "$@"
diff --git a/application/sis-javafx/src/main/artifact/bin/sis.bat b/application/sis-javafx/src/main/artifact/bin/sis.bat
index a71f977170..1cbf1ea342 100644
--- a/application/sis-javafx/src/main/artifact/bin/sis.bat
+++ b/application/sis-javafx/src/main/artifact/bin/sis.bat
@@ -24,4 +24,4 @@ java -classpath "%BASE_DIR%\lib\sis-console-2.0-SNAPSHOT.jar"^
      -Djava.util.logging.config.class=org.apache.sis.util.logging.Initializer^
      -Djava.util.logging.config.file="%BASE_DIR%\conf\logging.properties"^
      -Dderby.stream.error.file="%BASE_DIR%\log\derby.log"^
-     org.apache.sis.console.Command %SIS_OPTS% %*
+     %JAVA_OPTS% org.apache.sis.console.Command %SIS_OPTS% %*
diff --git a/application/sis-javafx/src/main/artifact/bin/sisfx b/application/sis-javafx/src/main/artifact/bin/sisfx
index a24781167d..14fe48096a 100755
--- a/application/sis-javafx/src/main/artifact/bin/sisfx
+++ b/application/sis-javafx/src/main/artifact/bin/sisfx
@@ -42,4 +42,4 @@ java -splash:"$BASE_DIR/lib/logo.jpg" \
      -Djava.util.logging.config.class="org.apache.sis.util.logging.Initializer" \
      -Djava.util.logging.config.file="$BASE_DIR/conf/logging.properties" \
      -Dderby.stream.error.file="$BASE_DIR/log/derby.log" \
-     org.apache.sis.gui.DataViewer $SIS_OPTS "$@"
+     $JAVA_OPTS org.apache.sis.gui.DataViewer $SIS_OPTS "$@"
diff --git a/application/sis-javafx/src/main/artifact/bin/sisfx.bat b/application/sis-javafx/src/main/artifact/bin/sisfx.bat
index 08887fe358..1c74e786e8 100644
--- a/application/sis-javafx/src/main/artifact/bin/sisfx.bat
+++ b/application/sis-javafx/src/main/artifact/bin/sisfx.bat
@@ -33,4 +33,4 @@ java -splash:"%BASE_DIR%\lib\logo.jpg"^
  -Djava.util.logging.config.class=org.apache.sis.util.logging.Initializer^
  -Djava.util.logging.config.file="%BASE_DIR%\conf\logging.properties"^
  -Dderby.stream.error.file="%BASE_DIR%\log\derby.log"^
- org.apache.sis.gui.DataViewer %SIS_OPTS%
+ %JAVA_OPTS% org.apache.sis.gui.DataViewer %SIS_OPTS%
diff --git a/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java b/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
index ff0fb61dcd..d1c21313b9 100644
--- a/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
+++ b/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/Assembler.java
@@ -79,7 +79,7 @@ public final class Assembler {
 
     /**
      * Relative path to be replaced by {@code "../"} path. We perform this substitution because the source files
-     * defined in the {@code source/developer-guide/<chapter>} directories reference directly the images in their
+     * defined in the {@code content/developer-guide/<chapter>} directories reference directly the images in their
      * final {@code static/book/images} directory.
      */
     private static final String[] PATHS_TO_REPLACE = {
@@ -138,7 +138,7 @@ public final class Assembler {
     /**
      * Creates a new assembler for the given input and output files.
      *
-     * @param  input   the input file (e.g. {@code "sis-site/main/source/developer-guide/index.html"}).
+     * @param  input   the input file (e.g. {@code "sis-site/main/content/developer-guide/index.html"}).
      * @throws ParserConfigurationException if this constructor cannot build the XML document.
      * @throws IOException if an error occurred while reading the file.
      * @throws SAXException if an error occurred while parsing the XML.
@@ -172,7 +172,7 @@ public final class Assembler {
                         "      http://www.apache.org/licenses/LICENSE-2.0" + LINE_SEPARATOR +
                         LINE_SEPARATOR +
                         "  This is an automatically generated file. DO NOT EDIT." + LINE_SEPARATOR +
-                        "  See the files in the `source/developer-guide` directory instead." + LINE_SEPARATOR +
+                        "  See the files in the `content/developer-guide` directory instead." + LINE_SEPARATOR +
                         LINE_SEPARATOR);
                 break;
             }
@@ -530,7 +530,7 @@ public final class Assembler {
 
     /**
      * Generates the {@code "static/book/en|fr/developer-guide.html"} files
-     * from {@code "source/developer-guide/[fr/]index.html"} files.
+     * from {@code "content/developer-guide/[fr/]index.html"} files.
      * The only argument expected by this method is the root of {@code sis-site} project.
      *
      * @param  args  command-line arguments. Should contain exactly on value, which is the site root directory.
@@ -549,7 +549,7 @@ public final class Assembler {
             System.err.println("Not a directory: " + directory);
             System.exit(1);
         }
-        final File source = new File(directory, "main/source");
+        final File source = new File(directory, "main/content");
         final File target = new File(directory, "asf-staging/book");
         final File input  = new File(source, "developer-guide/index.html");
         if (!input.isFile()) {
diff --git a/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java b/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java
index 7cad5fc6c9..304e62cdc1 100644
--- a/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java
+++ b/core/sis-build-helper/src/main/java/org/apache/sis/internal/book/package-info.java
@@ -16,7 +16,7 @@
  */
 
 /**
- * Takes the source HTML files in the {@code sis-site/main/source/developer-guide/} directory
+ * Takes the source HTML files in the {@code sis-site/main/content/developer-guide/} directory
  * and assembles them in a single file to be published in the {@code asf-staging/book/} directory.
  *
  * <p>The main class in this package is {@link org.apache.sis.internal.book.Assembler}.
@@ -28,7 +28,7 @@
  * │       └─ sis-build-helper
  * └─ site
  *     ├─ main
- *     │   └─ source
+ *     │   └─ content
  *     └─ asf-staging
  *         └─ book
  * </pre>


[sis] 07/08: Remove a hack for a Java 8 limitation fixed in Java 9.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 036c9fb30840330dbf22f84fd20b6964e74732f7
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 16:55:58 2022 +0100

    Remove a hack for a Java 8 limitation fixed in Java 9.
---
 .../internal/coverage/j2d/ColorModelFactory.java   |  31 ++----
 .../sis/internal/coverage/j2d/ColorModelPatch.java | 121 ---------------------
 .../coverage/j2d/MultiBandsIndexColorModel.java    |  43 +++++++-
 .../sis/internal/coverage/j2d/package-info.java    |   2 +-
 4 files changed, 47 insertions(+), 150 deletions(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
index 9b4e076afc..fd6f9dfa21 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelFactory.java
@@ -48,7 +48,7 @@ import org.apache.sis.util.Debug;
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Johann Sorel (Geomatys)
  * @author  Alexis Manin (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.0
  * @module
  */
@@ -66,8 +66,7 @@ public final class ColorModelFactory {
      *
      * @see #unique(ColorModel)
      */
-    @SuppressWarnings("rawtypes")   // TODO: Remove after we removed ColorModelPatch.
-    private static final WeakHashSet<ColorModelPatch> CACHE = new WeakHashSet<>(ColorModelPatch.class);
+    private static final WeakHashSet<ColorModel> CACHE = new WeakHashSet<>(ColorModel.class);
 
     /**
      * A pool of color models previously created by {@link #createColorModel()}.
@@ -245,7 +244,7 @@ public final class ColorModelFactory {
             final int[] nBits = {
                 DataBuffer.getDataTypeSize(dataType)
             };
-            return unique(new ComponentColorModel(cs, nBits, false, true, Transparency.OPAQUE, dataType));
+            return CACHE.unique(new ComponentColorModel(cs, nBits, false, true, Transparency.OPAQUE, dataType));
         }
         /*
          * Interpolates the colors in the color palette. Colors that do not fall
@@ -391,7 +390,7 @@ public final class ColorModelFactory {
             cm = new MultiBandsIndexColorModel(bits, length, ARGB, 0, hasAlpha, transparent,
                                                dataType, numBands, visibleBand);
         }
-        return unique(cm);
+        return CACHE.unique(cm);
     }
 
     /**
@@ -442,7 +441,7 @@ public final class ColorModelFactory {
             final ScaledColorSpace cs = new ScaledColorSpace(numComponents, visibleBand, minimum, maximum);
             cm = new ScaledColorModel(cs, dataType);
         }
-        return unique(cm);
+        return CACHE.unique(cm);
     }
 
     /**
@@ -571,7 +570,7 @@ public final class ColorModelFactory {
             cm = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), numBits, hasAlpha, false,
                             hasAlpha ? Transparency.TRANSLUCENT : Transparency.OPAQUE, DataBuffer.TYPE_BYTE);
         }
-        return unique(cm);
+        return CACHE.unique(cm);
     }
 
     /**
@@ -620,7 +619,7 @@ public final class ColorModelFactory {
             // TODO: handle other color models.
             return Optional.empty();
         }
-        return Optional.of(unique(subset));
+        return Optional.of(CACHE.unique(subset));
     }
 
     /**
@@ -641,22 +640,6 @@ public final class ColorModelFactory {
         }
     }
 
-    /**
-     * Returns a unique instance of the given color model.
-     * This method is automatically invoked by {@code create(…)} methods in this class.
-     *
-     * @param  <T>  the type of the color model to share.
-     * @param  cm   the color model for which to get a unique instance.
-     * @return a unique (shared) instance of the given color model.
-     */
-    private static <T extends ColorModel> T unique(T cm) {
-        // `CACHE` is null-safe and it is sometimes okay to return a null color model.
-        // ColorModelPatch is not null-safe, but it will be removed in a future version.
-        ColorModelPatch<T> c = new ColorModelPatch<>(cm);
-        c = CACHE.unique(c);
-        return c.cm;
-    }
-
     /**
      * Returns a suggested type for an {@link IndexColorModel} of {@code mapSize} colors.
      * This method returns {@link DataBuffer#TYPE_BYTE} or {@link DataBuffer#TYPE_USHORT}.
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelPatch.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelPatch.java
deleted file mode 100644
index 8fecb2a314..0000000000
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/ColorModelPatch.java
+++ /dev/null
@@ -1,121 +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.internal.coverage.j2d;
-
-import java.util.Arrays;
-import java.util.Objects;
-import java.awt.image.ColorModel;
-import java.awt.image.IndexColorModel;
-import org.apache.sis.util.Workaround;
-
-
-/**
- * Workaround for broken {@link ColorModel#equals(Object)} in Java 8 and before.
- * This workaround will be removed after upgrade to Java 9.
- *
- * @author  Martin Desruisseaux (Geomatys)
- * @version 1.0
- *
- * @see <a href="https://bugs.openjdk.java.net/browse/JDK-7107905"></a>
- * @todo Delete after migration to JDK9.
- */
-@Workaround(library = "JDK", version = "8")
-final class ColorModelPatch<T extends ColorModel> {
-    /**
-     * The color model to share.
-     */
-    final T cm;
-
-    /**
-     * For internal use only.
-     */
-    ColorModelPatch(final T cm) {
-        this.cm = cm;
-    }
-
-    /**
-     * Returns {@code true} if the given color models are equal. The {@link ColorModel} class
-     * defines an {@code equals} method, but as of Java 6 that method does not compare every
-     * attributes. For example, it does not compare the color space and the transfer type, so
-     * we have to compare them here.
-     *
-     * @param cm1  the first color model.
-     * @param cm2  the second color model.
-     * @return {@code true} if the two color models are equal.
-     */
-    private static boolean equals(final ColorModel cm1, final ColorModel cm2) {
-        if (cm1 == cm2) {
-            return true;
-        }
-        if (cm1 != null && cm1.equals(cm2) &&
-            cm1.getClass().equals(cm2.getClass()) &&
-            cm1.getTransferType() == cm2.getTransferType() &&
-            Objects.equals(cm1.getColorSpace(), cm2.getColorSpace()))
-        {
-            if (cm1 instanceof IndexColorModel) {
-                final IndexColorModel icm1 = (IndexColorModel) cm1;
-                final IndexColorModel icm2 = (IndexColorModel) cm2;
-                final int size = icm1.getMapSize();
-                if (icm2.getMapSize() == size &&
-                    icm1.getTransparentPixel() == icm2.getTransparentPixel() &&
-                    Objects.equals(icm1.getValidPixels(), icm2.getValidPixels()))
-                {
-                    for (int i=0; i<size; i++) {
-                        if (icm1.getRGB(i) != icm2.getRGB(i)) {
-                            return false;
-                        }
-                    }
-                }
-                if (cm1 instanceof MultiBandsIndexColorModel) {
-                    final MultiBandsIndexColorModel micm1 = (MultiBandsIndexColorModel) cm1;
-                    final MultiBandsIndexColorModel micm2 = (MultiBandsIndexColorModel) cm2;
-                    if (micm1.numBands != micm2.numBands || micm1.visibleBand != micm2.visibleBand) {
-                        return false;
-                    }
-                }
-            }
-            return true;
-        }
-        return false;
-    }
-
-    /**
-     * For internal use only.
-     *
-     * @param object object The object to compare to.
-     * @return {@code true} if both object are equal.
-     */
-    @Override
-    public boolean equals(final Object object) {
-        return (object instanceof ColorModelPatch<?>) && equals(cm, ((ColorModelPatch<?>) object).cm);
-    }
-
-    /**
-     * For internal use only.
-     */
-    @Override
-    public int hashCode() {
-        int code = cm.hashCode() ^ cm.getClass().hashCode();
-        if (cm instanceof IndexColorModel) {
-            final IndexColorModel icm = (IndexColorModel) cm;
-            final int[] ARGB = new int[icm.getMapSize()];
-            icm.getRGBs(ARGB);
-            code ^= Arrays.hashCode(ARGB);
-        }
-        return code;
-    }
-}
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/MultiBandsIndexColorModel.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/MultiBandsIndexColorModel.java
index 43eb231687..ed7531bab8 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/MultiBandsIndexColorModel.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/MultiBandsIndexColorModel.java
@@ -40,7 +40,7 @@ import java.awt.image.SinglePixelPackedSampleModel;
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Andrea Aime (TOPP)
- * @version 1.1
+ * @version 1.4
  * @since   1.0
  * @module
  */
@@ -95,12 +95,11 @@ final class MultiBandsIndexColorModel extends IndexColorModel {
      * There is no way to share the {@code int[]} array of ARGB values between two {@link IndexColorModel}s.</p>
      */
     final IndexColorModel createSubsetColorModel(final int[] bands) {
-        final int     bits        = getPixelSize();
         final int[]   cmap        = getARGB();
         final boolean hasAlpha    = hasAlpha();
         final int     transparent = getTransparentPixel();
         if (bands.length == 1) {
-            return new IndexColorModel(bits, cmap.length, cmap, 0, hasAlpha, transparent, transferType);
+            return new IndexColorModel(pixel_bits, cmap.length, cmap, 0, hasAlpha, transparent, transferType);
         }
         int vb = 0;
         for (int i=0; i<bands.length; i++) {
@@ -109,7 +108,7 @@ final class MultiBandsIndexColorModel extends IndexColorModel {
                 break;
             }
         }
-        return new MultiBandsIndexColorModel(bits, cmap.length, cmap, 0, hasAlpha, transparent, transferType, bands.length, vb);
+        return new MultiBandsIndexColorModel(pixel_bits, cmap.length, cmap, 0, hasAlpha, transparent, transferType, bands.length, vb);
     }
 
     /**
@@ -181,6 +180,17 @@ final class MultiBandsIndexColorModel extends IndexColorModel {
         }
     }
 
+    /**
+     * Returns the number of bits per pixel described by this color model.
+     * Must return a value different then {@code super.getPixelSize()} for avoiding that
+     * {@link IndexColorModel#equals(Object)} consider this color model equal to a standard
+     * {@code IndexColorModel} with the same color palette.
+     */
+    @Override
+    public int getPixelSize() {
+        return pixel_bits * numBands;
+    }
+
     /**
      * Returns an array of unnormalized color/alpha components for a specified pixel in this color model.
      * This method is the converse of {@link #getDataElements(int, Object)}.
@@ -278,4 +288,29 @@ final class MultiBandsIndexColorModel extends IndexColorModel {
                 sm.getNumBands()                     == numBands     &&
                 (1 << sm.getSampleSize(visibleBand)) >= getMapSize();
     }
+
+    /**
+     * Compares this color model with the given object for equality.
+     *
+     * @param  obj  the other object to compare with this color model.
+     * @return whether both object are equal.
+     */
+    @Override
+    public boolean equals(final Object obj) {
+         if (obj instanceof MultiBandsIndexColorModel) {
+             final MultiBandsIndexColorModel other = (MultiBandsIndexColorModel) obj;
+             return numBands == other.numBands && visibleBand == other.visibleBand && super.equals(other);
+         }
+         return false;
+    }
+
+    /**
+     * Returns a hash code value for this color model.
+     *
+     * @return a hash code value.
+     */
+    @Override
+    public int hashCode() {
+        return super.hashCode() + 31 * numBands + 37 * visibleBand;
+    }
 }
diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/package-info.java b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/package-info.java
index b3a3a342e2..ec09f80080 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/package-info.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/coverage/j2d/package-info.java
@@ -27,7 +27,7 @@
  * may change in incompatible ways in any future version without notice.
  *
  * @author  Johann Sorel (Geomatys)
- * @version 1.3
+ * @version 1.4
  * @since   1.0
  * @module
  */


[sis] 06/08: Remove OSGi dependency from core SIS modules. OSGi support has never been completed anyway. The class moved to `sis-webapp` in case we want to try again in the future.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ad687670cb6324752422ef6358081ec7211d3ad3
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sat Dec 10 16:25:34 2022 +0100

    Remove OSGi dependency from core SIS modules.
    OSGi support has never been completed anyway.
    The class moved to `sis-webapp` in case we want to try again in the future.
---
 application/sis-webapp/pom.xml                               |  8 ++++++++
 .../main/java/org/apache/sis/services}/OSGiActivator.java    |  4 +++-
 core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java  |  8 ++++----
 core/sis-utility/pom.xml                                     | 12 ------------
 .../org/apache/sis/internal/converter/SystemRegistry.java    |  7 ++++---
 .../java/org/apache/sis/internal/converter/package-info.java |  7 +++----
 .../java/org/apache/sis/internal/system/SystemListener.java  |  3 +--
 ide-project/NetBeans/nbproject/project.properties            |  4 +---
 pom.xml                                                      |  6 ------
 9 files changed, 24 insertions(+), 35 deletions(-)

diff --git a/application/sis-webapp/pom.xml b/application/sis-webapp/pom.xml
index c59f243964..f39fd38c38 100644
--- a/application/sis-webapp/pom.xml
+++ b/application/sis-webapp/pom.xml
@@ -44,6 +44,14 @@
       <version>8.0.1</version>
       <scope>provided</scope>
     </dependency>
+
+    <!-- Optional dependencies -->
+    <dependency>
+      <groupId>org.osgi</groupId>
+      <artifactId>org.osgi.core</artifactId>
+      <version>6.0.0</version>
+      <scope>provided</scope>
+    </dependency>
   </dependencies>
 
 </project>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java b/application/sis-webapp/src/main/java/org/apache/sis/services/OSGiActivator.java
similarity index 95%
rename from core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
rename to application/sis-webapp/src/main/java/org/apache/sis/services/OSGiActivator.java
index 1c8f9a83f7..2a3d4b725a 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/OSGiActivator.java
+++ b/application/sis-webapp/src/main/java/org/apache/sis/services/OSGiActivator.java
@@ -14,12 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.sis.internal.system;
+package org.apache.sis.services;
 
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleEvent;
 import org.osgi.framework.BundleListener;
+import org.apache.sis.internal.system.Shutdown;
+import org.apache.sis.internal.system.SystemListener;
 
 
 /**
diff --git a/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java b/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
index 31ec54506d..204af20a66 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/xml/XML.java
@@ -378,8 +378,8 @@ public final class XML extends Static {
      * The field name uses the uppercase convention because this field is almost constant:
      * this field is initially null, then created by {@link #getPool()} when first needed.
      * Once created the field value usually doesn't change. However, the field may be reset
-     * to {@code null} in an OSGi context when modules are loaded or unloaded, because the
-     * set of classes returned by {@link TypeRegistration#load(boolean)} may have changed.
+     * to {@code null} when modules are loaded or unloaded by a container such as OSGi,
+     * because the set of classes returned by {@link TypeRegistration#load(boolean)} may have changed.
      *
      * @see #getPool()
      */
@@ -409,8 +409,8 @@ public final class XML extends Static {
      * <div class="note"><b>Implementation note:</b>
      * Current implementation uses the double-check idiom. This is usually a deprecated practice
      * (the recommended alterative is to use static class initialization), but in this particular
-     * case the field may be reset to {@code null} if OSGi modules are loaded or unloaded, so static
-     * class initialization would be a little bit too rigid.</div>
+     * case the field may be reset to {@code null} if modules are loaded or unloaded by a container,
+     * so static class initialization would be a little bit too rigid.</div>
      */
     @SuppressWarnings("DoubleCheckedLocking")
     private static MarshallerPool getPool() throws JAXBException {
diff --git a/core/sis-utility/pom.xml b/core/sis-utility/pom.xml
index e314d97b1a..b486274f4f 100644
--- a/core/sis-utility/pom.xml
+++ b/core/sis-utility/pom.xml
@@ -136,16 +136,4 @@
     </plugins>
   </build>
 
-
-  <!-- ===========================================================
-           Dependencies
-       =========================================================== -->
-  <dependencies>
-    <!-- Optional dependencies (provided scope) -->
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-    </dependency>
-  </dependencies>
-
 </project>
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
index f3997a5bba..97a3079ab5 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemRegistry.java
@@ -70,9 +70,10 @@ public final class SystemRegistry extends ConverterRegistry {
         /*
          * Force reloading of META-INF/services files if the classpath changed,
          * since the set of reachable META-INF/services files may have changed.
-         * If any converters were registered by explicit calls to the 'register' method,
-         * then those converters are lost. This is of concern only for applications using
-         * a modularization framework like OSGi. See package javadoc for more information.
+         * If any converters were registered by explicit calls to the `register` method,
+         * then those converters are lost. This is of concern only for applications
+         * using a container framework such as Servlet or OSGi.
+         * See package javadoc for more information.
          */
         SystemListener.add(new SystemListener(Modules.UTILITIES) {
             @Override protected void classpathChanged() {
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/package-info.java b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/package-info.java
index 9a4e383ee3..76a4ad6a7c 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/converter/package-info.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/converter/package-info.java
@@ -32,10 +32,9 @@
  *     META-INF/services/org.apache.sis.util.ObjectConverter
  * }
  *
- * Applications deployed in a modularization framework like OSGi shall use only the
- * {@code META-INF} approach, because system converters are discarded every time the
- * classpath changes. Having the converters declared in {@code META-INF} ensure that
- * they will be reloaded when needed.
+ * Applications deployed in a container framework like OSGi shall use only the service loader,
+ * because system converters are discarded every time that the classpath changes.
+ * Having the converters declared in {@code META-INF} ensure that they will be reloaded when needed.
  *
  * <p>Alternatively, applications can also use their own {@code ConverterRegistry} instance.
  * Non-system instances do not scan for {@code META-INF} and do not discard their content on
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java b/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
index ad7a43d75f..2283d1b0f2 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/SystemListener.java
@@ -94,12 +94,11 @@ public abstract class SystemListener implements EventListener {
 
     /**
      * Removes all listeners for the module of the given name.
-     * This method is invoked by {@link OSGiActivator}.
      *
      * @param  name  the name of the module for which to remove listeners, or {@code null} if the module
      *         to uninstall does not have symbolic name (in which case it is probably not a SIS module).
      */
-    static synchronized void removeModule(final String name) {
+    public static synchronized void removeModule(final String name) {
         if (name != null) {
             final SystemListener[] list = listeners;
             if (list != null) {
diff --git a/ide-project/NetBeans/nbproject/project.properties b/ide-project/NetBeans/nbproject/project.properties
index e6ace69739..e537f44c7a 100644
--- a/ide-project/NetBeans/nbproject/project.properties
+++ b/ide-project/NetBeans/nbproject/project.properties
@@ -110,7 +110,6 @@ re2j.version         = 1.3
 esri.api.version     = 2.2.4
 jts.version          = 1.19.0
 jdom2.version        = 2.0.6
-osgi.version         = 6.0.0
 netcdf.version       = 5.5.3
 joda-time.version    = 2.10.3
 httpclient.version   = 4.5.13
@@ -139,8 +138,7 @@ javac.classpath=\
     ${maven.repository}/org/postgresql/postgresql/${postgresql.version}/postgresql-${postgresql.version}.jar:\
     ${maven.repository}/edu/ucar/cdm-core/${netcdf.version}/cdm-core-${netcdf.version}.jar:\
     ${maven.repository}/edu/ucar/udunits/${netcdf.version}/udunits-${netcdf.version}.jar:\
-    ${maven.repository}/com/google/guava/guava/${guava.version}/guava-${guava.version}.jar:\
-    ${maven.repository}/org/osgi/org.osgi.core/${osgi.version}/org.osgi.core-${osgi.version}.jar
+    ${maven.repository}/com/google/guava/guava/${guava.version}/guava-${guava.version}.jar
 javac.processorpath=\
     ${javac.classpath}
 javac.test.classpath=\
diff --git a/pom.xml b/pom.xml
index 416481c0fd..3e85c4c59f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -509,12 +509,6 @@
       </dependency>
 
       <!-- Optional dependencies -->
-      <dependency>
-        <groupId>org.osgi</groupId>
-        <artifactId>org.osgi.core</artifactId>
-        <version>6.0.0</version>
-        <scope>provided</scope>
-      </dependency>
       <dependency>
         <groupId>edu.ucar</groupId>
         <artifactId>cdm-core</artifactId>