Enable spotbugs in mdsal-{common,binding,dom}-api 83/76783/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 9 Oct 2018 10:35:22 +0000 (12:35 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 9 Oct 2018 13:24:51 +0000 (13:24 +0000)
This suppresses the single violation and flips the switch.

Change-Id: I48e8364604192a973a05bf35631551091403e2b2
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-api/pom.xml
common/mdsal-common-api/pom.xml
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/DataValidationFailedException.java
dom/mdsal-dom-api/pom.xml

index a96333092f4cf63010f04f60c1ac88e1a1ed4975..9d2b650492a2bb35d0624ba0a2bb04b1bc23aa14 100644 (file)
                     <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
+                <configuration>
+                    <failOnError>true</failOnError>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
index 3d1f05afa965a2bee69e3ebb9cb86b328ee3a3b0..3fb8b9f3a030bccbf7b0a22ac7deab147d3c848c 100644 (file)
                     <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
+                <configuration>
+                    <failOnError>true</failOnError>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
index ea4f08d1645353622869f5c8235581fff340ff0a..4bae92e85f8f67856ee6af65433e65649f79627f 100644 (file)
@@ -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<? extends Path<?>> pathType;
index fe856c52f4879659595463c8c96f3ebe98af63a7..f176259877a69ae817acecec92346f22d64c0de7 100644 (file)
                     <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>com.github.spotbugs</groupId>
+                <artifactId>spotbugs-maven-plugin</artifactId>
+                <configuration>
+                    <failOnError>true</failOnError>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
     <scm>