From 98a5d8fdec1e535a81a1d31a3ee34b893a24d983 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 9 Oct 2018 12:35:22 +0200 Subject: [PATCH] Enable spotbugs in mdsal-{common,binding,dom}-api This suppresses the single violation and flips the switch. Change-Id: I48e8364604192a973a05bf35631551091403e2b2 Signed-off-by: Robert Varga --- binding/mdsal-binding-api/pom.xml | 7 +++++++ common/mdsal-common-api/pom.xml | 7 +++++++ .../mdsal/common/api/DataValidationFailedException.java | 2 ++ dom/mdsal-dom-api/pom.xml | 7 +++++++ 4 files changed, 23 insertions(+) diff --git a/binding/mdsal-binding-api/pom.xml b/binding/mdsal-binding-api/pom.xml index a96333092f..9d2b650492 100644 --- a/binding/mdsal-binding-api/pom.xml +++ b/binding/mdsal-binding-api/pom.xml @@ -109,6 +109,13 @@ checkstyle.violationSeverity=error + + com.github.spotbugs + spotbugs-maven-plugin + + true + + diff --git a/common/mdsal-common-api/pom.xml b/common/mdsal-common-api/pom.xml index 3d1f05afa9..3fb8b9f3a0 100644 --- a/common/mdsal-common-api/pom.xml +++ b/common/mdsal-common-api/pom.xml @@ -78,6 +78,13 @@ checkstyle.violationSeverity=error + + com.github.spotbugs + spotbugs-maven-plugin + + true + + diff --git a/common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/DataValidationFailedException.java b/common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/DataValidationFailedException.java index ea4f08d164..4bae92e85f 100644 --- a/common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/DataValidationFailedException.java +++ b/common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/DataValidationFailedException.java @@ -9,6 +9,7 @@ package org.opendaylight.mdsal.common.api; import static java.util.Objects.requireNonNull; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.opendaylight.yangtools.concepts.Path; import org.opendaylight.yangtools.yang.common.RpcError.ErrorType; import org.opendaylight.yangtools.yang.common.RpcResultBuilder; @@ -25,6 +26,7 @@ public class DataValidationFailedException extends TransactionCommitFailedExcept private static final long serialVersionUID = 1L; + @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "Interfaces do not specify Serializable") private final Path path; private final Class> pathType; diff --git a/dom/mdsal-dom-api/pom.xml b/dom/mdsal-dom-api/pom.xml index fe856c52f4..f176259877 100644 --- a/dom/mdsal-dom-api/pom.xml +++ b/dom/mdsal-dom-api/pom.xml @@ -93,6 +93,13 @@ checkstyle.violationSeverity=error + + com.github.spotbugs + spotbugs-maven-plugin + + true + + -- 2.36.6