You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by js...@apache.org on 2023/05/16 06:50:49 UTC

[sis] branch feat/coverage-json updated: chore(CoverageJSON): update test suite, fix checkstyle violations

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

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


The following commit(s) were added to refs/heads/feat/coverage-json by this push:
     new 6ca8b052c0 chore(CoverageJSON): update test suite, fix checkstyle violations
6ca8b052c0 is described below

commit 6ca8b052c04b2b0494d28958690643c18cd8eb25
Author: jsorel <jo...@geomatys.com>
AuthorDate: Tue May 16 08:50:29 2023 +0200

    chore(CoverageJSON): update test suite, fix checkstyle violations
---
 .../internal/coveragejson/CoverageJsonStore.java   |  6 +--
 .../coveragejson/binding/CoverageJsonObject.java   |  2 +-
 .../coveragejson/CoverageJsonTestSuite.java        | 44 ----------------------
 3 files changed, 4 insertions(+), 48 deletions(-)

diff --git a/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/CoverageJsonStore.java b/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/CoverageJsonStore.java
index ac1800821f..8a41c2d7bd 100644
--- a/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/CoverageJsonStore.java
+++ b/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/CoverageJsonStore.java
@@ -64,7 +64,7 @@ public class CoverageJsonStore extends DataStore implements WritableAggregate {
      */
     private final Path path;
 
-    private boolean parsed = false;
+    private boolean parsed;
     private final List<Resource> components = new ArrayList<>();
 
     CoverageJsonStore(CoverageJsonStoreProvider provider, StorageConnector connector) throws DataStoreException {
@@ -90,8 +90,8 @@ public class CoverageJsonStore extends DataStore implements WritableAggregate {
         if (!parsed) {
             parsed = true;
             if (Files.exists(path)) {
-                try (final Jsonb b = JsonbBuilder.create();
-                     final InputStream in = new BufferedInputStream(Files.newInputStream(path))) {
+                try (Jsonb b = JsonbBuilder.create();
+                     InputStream in = new BufferedInputStream(Files.newInputStream(path))) {
                     final CoverageJsonObject obj = b.fromJson(in, CoverageJsonObject.class);
 
                     if (obj instanceof Coverage) {
diff --git a/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/binding/CoverageJsonObject.java b/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/binding/CoverageJsonObject.java
index 1b80490a85..2a31e41e01 100644
--- a/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/binding/CoverageJsonObject.java
+++ b/storage/sis-coveragejson/src/main/java/org/apache/sis/internal/coveragejson/binding/CoverageJsonObject.java
@@ -50,6 +50,6 @@ import jakarta.json.bind.annotation.JsonbTypeInfo;
     @JsonbSubtype(alias = "VerticalCRS", type = VerticalCRS.class),
     @JsonbSubtype(alias = "TemporalRS", type = TemporalRS.class)
 })
-public class CoverageJsonObject extends Dictionary<Object>{
+public class CoverageJsonObject extends Dictionary<Object> {
 
 }
diff --git a/storage/sis-coveragejson/src/test/java/org/apache/sis/internal/coveragejson/CoverageJsonTestSuite.java b/storage/sis-coveragejson/src/test/java/org/apache/sis/internal/coveragejson/CoverageJsonTestSuite.java
deleted file mode 100644
index 3de67e2b7d..0000000000
--- a/storage/sis-coveragejson/src/test/java/org/apache/sis/internal/coveragejson/CoverageJsonTestSuite.java
+++ /dev/null
@@ -1,44 +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.coveragejson;
-
-import org.apache.sis.internal.coveragejson.binding.BindingTest;
-import org.apache.sis.test.TestSuite;
-import org.junit.BeforeClass;
-import org.junit.runners.Suite;
-
-
-/**
- * All tests from the {@code sis-coveragejson} module, in rough dependency order.
- *
- * @author Johann Sorel (Geomatys)
- */
-@Suite.SuiteClasses({
-    BindingTest.class,
-    CoverageJsonStoreTest.class
-})
-public final class CoverageJsonTestSuite extends TestSuite {
-    /**
-     * Verifies the list of tests before to run the suite.
-     * See {@link #verifyTestList(Class, Class[])} for more information.
-     */
-    @BeforeClass
-    public static void verifyTestList() {
-        assertNoMissingTest(CoverageJsonTestSuite.class);
-        verifyTestList(CoverageJsonTestSuite.class);
-    }
-}