Remove unneeded SB suppressions 57/106457/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 13 Jun 2023 08:31:52 +0000 (10:31 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 13 Jun 2023 08:44:42 +0000 (10:44 +0200)
The false positive has been fixed up to a sufficient degree, hence we
can remove the suppression.

Change-Id: Idd7634891e9680f6e42e4b34227e3540435e98e8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
plugin/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/ProcessorModuleReactor.java
yang/yang-repo-fs/pom.xml
yang/yang-repo-fs/src/main/java/module-info.java
yang/yang-repo-fs/src/main/java/org/opendaylight/yangtools/yang/model/repo/fs/FilesystemSchemaSourceCache.java

index 177bd4bfb67f355da34429d3990c6f157bd9a9a5..20d55e910e81d3aa8cb8cddfac8e0e679c21d638 100644 (file)
@@ -15,7 +15,6 @@ import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Maps;
 import com.google.common.io.CharStreams;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.IOException;
 import java.io.Reader;
 import java.util.Collection;
@@ -89,8 +88,6 @@ final class ProcessorModuleReactor {
         return modelsInProject.values();
     }
 
-    @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE",
-        justification = "https://github.com/spotbugs/spotbugs/issues/600")
     private static Collection<YangTextSchemaSource> toUniqueSources(final Collection<ScannedDependency> dependencies)
             throws IOException {
         final Map<String, YangTextSchemaSource> byContent = new HashMap<>();
index ac25c3a5996229b1a5aa1d06b1a65dfa98468ba9..d0c822bcaecb6dcc2b9c359f4b92ed20b3dae504 100644 (file)
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-model-api</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.github.spotbugs</groupId>
-            <artifactId>spotbugs-annotations</artifactId>
-            <optional>true</optional>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.yangtools</groupId>
             <artifactId>yang-repo-api</artifactId>
index 0bc30aa847b71e7c33233e250f403b959f3751ed..069107a7704ace67e37aaafc07ec3a1e1f9cc59a 100644 (file)
@@ -15,7 +15,4 @@ module org.opendaylight.yangtools.yang.model.repo.fs {
     requires org.opendaylight.yangtools.yang.common;
     requires org.opendaylight.yangtools.yang.model.api;
     requires org.slf4j;
-
-    // Annotations
-    requires static com.github.spotbugs.annotations;
 }
index 6871381fcbe615fbed67d04cf82851bf7b9336cf..5e5a8a653c4941195e3bdfd0a1dde81b36760534 100644 (file)
@@ -13,7 +13,6 @@ import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediate
 import static org.opendaylight.yangtools.util.concurrent.FluentFutures.immediateFluentFuture;
 
 import com.google.common.util.concurrent.FluentFuture;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.File;
 import java.io.FilenameFilter;
 import java.io.IOException;
@@ -235,8 +234,6 @@ public final class FilesystemSchemaSourceCache<T extends SchemaSourceRepresentat
         }
 
         @Override
-        @SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE",
-            justification = "https://github.com/spotbugs/spotbugs/issues/600")
         protected void storeAsType(final File file, final YangTextSchemaSource cast) {
             try (var castStream = cast.asByteSource(StandardCharsets.UTF_8).openStream()) {
                 Files.copy(castStream, file.toPath(), StandardCopyOption.REPLACE_EXISTING);