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 2021/12/05 16:54:10 UTC

[sis] 02/03: Subset of wrapper should continue to delegate to the wrapper.

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 d067cce04a34f6f25003216de567f8dfa7143357
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sun Dec 5 01:24:21 2021 +0100

    Subset of wrapper should continue to delegate to the wrapper.
---
 .../apache/sis/internal/storage/GridResourceWrapper.java   | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java
index dcced1d..3794c4f 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/GridResourceWrapper.java
@@ -24,7 +24,6 @@ import org.apache.sis.coverage.grid.GridGeometry;
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.storage.GridCoverageResource;
 import org.apache.sis.storage.RasterLoadingStrategy;
-import org.apache.sis.storage.Query;
 import org.apache.sis.storage.event.StoreEvent;
 import org.apache.sis.storage.event.StoreListener;
 import org.apache.sis.util.collection.BackingStoreException;
@@ -192,18 +191,9 @@ public abstract class GridResourceWrapper implements GridCoverageResource {
         return source().setLoadingStrategy(strategy);
     }
 
-    /**
-     * Requests a subset of the coverage.
-     * The default implementation delegates to the source.
-     *
-     * @param  query  definition of domain (grid extent) and range (sample dimensions) filtering applied at reading time.
-     * @return resulting coverage resource (never {@code null}).
-     * @throws DataStoreException if an error occurred while processing the query.
+    /*
+     * Do not override `subset(Query)`. We want the subset to delegate to this wrapper.
      */
-    @Override
-    public GridCoverageResource subset(final Query query) throws DataStoreException {
-        return source().subset(query);
-    }
 
     /**
      * Registers a listener to notify when the specified kind of event occurs in this resource or in children.