Fix Java 11 build 26/76726/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 8 Oct 2018 05:50:12 +0000 (07:50 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 8 Oct 2018 05:50:12 +0000 (07:50 +0200)
This fixes spotbugs/Java11 false positive.

Change-Id: Idb8e648bf35f0c9f73a236dcfc8a8419e800cacb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-maven-plugin/src/main/java/org/opendaylight/yangtools/yang2sources/plugin/ProcessorModuleReactor.java

index 1749c10b0010b5d3bc400a7ee3c03405d62da81e..2db1bfaf2f9f3e90b15a84332d942bc941a62771 100644 (file)
@@ -13,6 +13,7 @@ import com.google.common.base.Verify;
 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.nio.charset.StandardCharsets;
@@ -85,6 +86,8 @@ 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<>();