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 0e267fe58491a2dd92514526c69fca4dda24a941
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Fri Jul 28 14:13:05 2023 +0200

    Move a service provider declared in the wrong module.
    Remove an unnecessary cast.
---
 .../main/resources/META-INF/services/org.opengis.util.NameFactory | 0
 .../java/org/apache/sis/test/storage/CoverageReadConsistency.java | 8 +++-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/core/sis-utility/src/main/resources/META-INF/services/org.opengis.util.NameFactory
 
b/core/sis-metadata/src/main/resources/META-INF/services/org.opengis.util.NameFactory
similarity index 100%
rename from 
core/sis-utility/src/main/resources/META-INF/services/org.opengis.util.NameFactory
rename to 
core/sis-metadata/src/main/resources/META-INF/services/org.opengis.util.NameFactory
diff --git 
a/storage/sis-storage/src/test/java/org/apache/sis/test/storage/CoverageReadConsistency.java
 
b/storage/sis-storage/src/test/java/org/apache/sis/test/storage/CoverageReadConsistency.java
index 9e7a009b25..2d62ce352a 100644
--- 
a/storage/sis-storage/src/test/java/org/apache/sis/test/storage/CoverageReadConsistency.java
+++ 
b/storage/sis-storage/src/test/java/org/apache/sis/test/storage/CoverageReadConsistency.java
@@ -27,7 +27,6 @@ import org.apache.sis.coverage.grid.GridCoverage;
 import org.apache.sis.coverage.grid.GridDerivation;
 import org.apache.sis.coverage.grid.GridGeometry;
 import org.apache.sis.coverage.grid.GridExtent;
-import org.apache.sis.storage.AbstractGridCoverageResource;
 import org.apache.sis.storage.DataStoreException;
 import org.apache.sis.storage.GridCoverageResource;
 import org.apache.sis.storage.RasterLoadingStrategy;
@@ -254,10 +253,8 @@ public class CoverageReadConsistency extends TestCase {
      * Applies a random configuration on the resource.
      */
     private void randomConfigureResource() throws DataStoreException {
-        if (resource instanceof AbstractGridCoverageResource) {
-            final RasterLoadingStrategy[] choices = 
RasterLoadingStrategy.values();
-            ((AbstractGridCoverageResource) 
resource).setLoadingStrategy(choices[random.nextInt(choices.length)]);
-        }
+        final RasterLoadingStrategy[] choices = RasterLoadingStrategy.values();
+        resource.setLoadingStrategy(choices[random.nextInt(choices.length)]);
     }
 
     /**
@@ -445,6 +442,7 @@ nextSlice:  for (;;) {
      * Prints statistics about execution time (in milliseconds) after all 
tests completed.
      */
     @AfterClass
+    @SuppressWarnings("UseOfSystemOutOrSystemErr")
     public static void printDurations() {
         if (statistics != null) {
             // It is too late for using `TestCase.out`.

Reply via email to