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
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new 37e689f Fetching file extension shall work in the case where the
given `storage` argument is already an instance of StorageConnector.
37e689f is described below
commit 37e689ff4c95854dadcff81c91780675ef0b4946
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Tue Apr 9 11:23:29 2019 +0200
Fetching file extension shall work in the case where the given `storage`
argument is already an instance of StorageConnector.
---
.../src/main/java/org/apache/sis/storage/DataStoreRegistry.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
b/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
index 2dc44de..75d1597 100644
---
a/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
+++
b/storage/sis-storage/src/main/java/org/apache/sis/storage/DataStoreRegistry.java
@@ -23,7 +23,6 @@ import java.util.Iterator;
import java.util.ServiceLoader;
import org.apache.sis.internal.storage.Resources;
import org.apache.sis.internal.storage.StoreMetadata;
-import org.apache.sis.internal.storage.io.IOUtilities;
import org.apache.sis.internal.system.DefaultFactories;
import org.apache.sis.internal.referencing.LazySet;
import org.apache.sis.util.ArgumentChecks;
@@ -163,7 +162,7 @@ final class DataStoreRegistry {
* iteration on other providers (matchCondition = FALSE). The intent
is to avoid DataStoreProvider.probeContent(…)
* invocations loading large dependencies.
*/
- final String extension = IOUtilities.extension(storage);
+ final String extension = connector.getFileExtension();
Boolean matchCondition = (extension != null && !extension.isEmpty()) ?
Boolean.TRUE : null;
final List<ProbeProviderPair> needMoreBytes = new LinkedList<>();
ProbeProviderPair selected = null;