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

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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new cbba27224d fix(Shapefile): fix provider not returned
cbba27224d is described below

commit cbba27224d5fb97f6fb64785448f0da4c2b11b72
Author: jsorel <[email protected]>
AuthorDate: Wed Apr 15 16:47:01 2026 +0200

    fix(Shapefile): fix provider not returned
---
 .../apache/sis/storage/shapefile/ShapefileProvider.java | 17 +++++++++++++++++
 .../apache/sis/storage/shapefile/ShapefileStore.java    |  6 ++++++
 2 files changed, 23 insertions(+)

diff --git 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java
 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java
index ecb18705b6..db23ad3371 100644
--- 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java
+++ 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileProvider.java
@@ -61,6 +61,23 @@ public final class ShapefileProvider extends 
DataStoreProvider {
             new 
ParameterBuilder().addName(NAME).addName("EsriShapefileParameters").createGroup(
                 PATH);
 
+    private static ShapefileProvider INSTANCE;
+
+    /**
+     * Get singleton instance of shapefile provider.
+     *
+     * <p>
+     * Note : this method is named after Java 9 service loader provider method.
+     * {@link 
https://docs.oracle.com/javase/9/docs/api/java/util/ServiceLoader.html}
+     * </p>
+     *
+     * @return singleton instance of ShapefileProvider
+     */
+    public static synchronized ShapefileProvider provider() {
+        if (INSTANCE == null) INSTANCE = new ShapefileProvider();
+        return INSTANCE;
+    }
+
     /**
      * Default constructor.
      */
diff --git 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java
 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java
index bee856c6c8..53f00dce52 100644
--- 
a/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java
+++ 
b/incubator/src/org.apache.sis.storage.shapefile/main/org/apache/sis/storage/shapefile/ShapefileStore.java
@@ -129,6 +129,7 @@ import org.opengis.filter.LogicalOperatorName;
 import org.opengis.filter.SpatialOperatorName;
 import org.opengis.filter.ValueReference;
 import org.apache.sis.geometry.wrapper.*;
+import org.apache.sis.storage.DataStoreProvider;
 
 
 /**
@@ -207,6 +208,11 @@ public final class ShapefileStore extends DataStore 
implements WritableFeatureSe
         return featureSetView.getIdentifier();
     }
 
+    @Override
+    public DataStoreProvider getProvider() {
+        return ShapefileProvider.provider();
+    }
+
     /**
      * {@inheritDoc }
      */

Reply via email to