Fix FindBugs warnings in sal-remoterpc-connector and enable enforcement
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / main / java / org / opendaylight / controller / remote / rpc / RemoteRpcProviderConfig.java
index 8cdf9c5ef165f1bb256499d6e2de41eba369547f..b08df445595cf65011488eb8c4d1e306a6a1fc60 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.controller.remote.rpc;
 
 import akka.util.Timeout;
 import com.typesafe.config.Config;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.concurrent.TimeUnit;
 import org.opendaylight.controller.cluster.common.actor.CommonConfig;
 import scala.concurrent.duration.FiniteDuration;
@@ -82,6 +83,10 @@ public class RemoteRpcProviderConfig extends CommonConfig {
     /**
      * This is called via blueprint xml as the builder pattern can't be used.
      */
+    @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE",
+            justification = "Findbugs flags this as an unconfirmed cast of return value but the build method clearly "
+                + "returns RemoteRpcProviderConfig. Perhaps it's confused b/c the build method is overloaded and "
+                + "and differs in return type from the base class.")
     public static RemoteRpcProviderConfig newInstance(String actorSystemName, boolean metricCaptureEnabled,
             int mailboxCapacity) {
         return new Builder(actorSystemName).metricCaptureEnabled(metricCaptureEnabled)