Suppress UPM_UNCALLED_PRIVATE_METHOD 82/86582/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 26 Dec 2019 13:24:11 +0000 (14:24 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 26 Dec 2019 13:27:55 +0000 (14:27 +0100)
This is a SpotBugs deficiency, suppress warnings generated from it.

JIRA: YANGTOOLS-1056
Change-Id: I5d440de6ce98207c72727273eedf26d3c0626f86
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/deviate/AbstractDeviateStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/import_/SemanticVersionImport.java

index 7e5c90fc2dfa0495a006eaa015a55b8b9b1ef27c..fe87e9411d7c4f6234afffb5aa7f03ec0a2a9989 100644 (file)
@@ -11,6 +11,7 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
 import com.google.common.collect.SetMultimap;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Objects;
@@ -231,6 +232,8 @@ abstract class AbstractDeviateStatementSupport extends AbstractStatementSupport<
         return false;
     }
 
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+            justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static void performDeviateAdd(final StatementContextBase<?, ?, ?> deviateStmtCtx,
             final StatementContextBase<?, ?, ?> targetCtx) {
         for (Mutable<?, ?, ?> originalStmtCtx : deviateStmtCtx.mutableDeclaredSubstatements()) {
@@ -258,6 +261,8 @@ abstract class AbstractDeviateStatementSupport extends AbstractStatementSupport<
         copyStatement(stmtCtxToBeAdded, targetCtx);
     }
 
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+            justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static void performDeviateReplace(final StatementContextBase<?, ?, ?> deviateStmtCtx,
             final StatementContextBase<?, ?, ?> targetCtx) {
         for (Mutable<?, ?, ?> originalStmtCtx : deviateStmtCtx.mutableDeclaredSubstatements()) {
@@ -307,6 +312,8 @@ abstract class AbstractDeviateStatementSupport extends AbstractStatementSupport<
                 stmtToBeReplaced.getStatementName(), targetCtx.getStatementArgument());
     }
 
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+            justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static void performDeviateDelete(final StatementContextBase<?, ?, ?> deviateStmtCtx,
             final StatementContextBase<?, ?, ?> targetCtx) {
         for (Mutable<?, ?, ?> originalStmtCtx : deviateStmtCtx.mutableDeclaredSubstatements()) {
index 17ea58a2e20e2a5b6b3488ae662df767e3f87358..8ad6633cce04dcfb6bada964739c665740f213eb 100644 (file)
@@ -12,6 +12,7 @@ import static org.opendaylight.yangtools.yang.parser.spi.meta.ModelProcessingPha
 import static org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils.firstAttributeOf;
 
 import com.google.common.base.MoreObjects.ToStringHelper;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.net.URI;
 import java.util.Collection;
 import java.util.Optional;
@@ -175,13 +176,17 @@ final class SemanticVersionImport {
         return Optional.ofNullable(stmt.getFromNamespace(SemanticVersionNamespace.class, stmt));
     }
 
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+            justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static String getRequestedImportVersionString(final StmtContext<?, ?, ?> stmt) {
         return getRequestedImportVersion(stmt).map(SemVer::toString).orElse("<any>");
     }
 
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+            justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private static SemVerSourceIdentifier createSemVerModuleIdentifier(
             final SourceIdentifier importedModuleIdentifier, final SemVer semVer) {
         return SemVerSourceIdentifier.create(importedModuleIdentifier.getName(),
             importedModuleIdentifier.getRevision(), semVer);
     }
-}
\ No newline at end of file
+}