Remove unused @SuppressFBWarnings 84/111884/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 28 May 2024 14:54:56 +0000 (16:54 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 28 May 2024 14:54:56 +0000 (16:54 +0200)
Upgraded SpotBugs no longer reports a false positive, fix that up,
eliminating the dependency from yang-test-util.

Change-Id: Ib3ad5125fac3d8b2c360a10bf0eb3572b87e7c35
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
parser/yang-test-util/pom.xml
parser/yang-test-util/src/main/java/org/opendaylight/yangtools/yang/test/util/YangParserTestUtils.java

index 398156fe96b55d1310c9cec83d6b01d1722e351b..24db99f4970919af81733ff58c35b6257f6cdc7f 100644 (file)
     </properties>
 
     <dependencies>
-        <dependency>
-            <groupId>com.github.spotbugs</groupId>
-            <artifactId>spotbugs-annotations</artifactId>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.eclipse.jdt</groupId>
             <artifactId>org.eclipse.jdt.annotation</artifactId>
index d6030ae7949325d9b344e4932ee5226a4895eeb9..e46195ac3ec3c24454576e63be3766d7f3549e9e 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.test.util;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.File;
 import java.io.FileFilter;
 import java.io.IOException;
@@ -257,7 +256,6 @@ public final class YangParserTestUtils {
      * @param config parser configuration
      * @return effective schema context
      */
-    @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Wrong inferent on listFiles")
     public static @NonNull EffectiveModelContext parseYangResourceDirectory(final String resourcePath,
             final Set<QName> supportedFeatures, final YangParserConfiguration config) {
         final URI directoryPath;
@@ -383,7 +381,6 @@ public final class YangParserTestUtils {
             Arrays.stream(sources).map(YangParserTestUtils::createYangTextSource).toList());
     }
 
-    @SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "Wrong inferent on listFiles")
     private static Collection<File> getYangFiles(final String resourcePath) {
         final URI directoryPath;
         try {