Bump odlparent to 6.0.0
[netconf.git] / netconf / netconf-topology-singleton / src / main / java / org / opendaylight / netconf / topology / singleton / impl / tx / ActorProxyTransactionFacade.java
index d39e960aeb32ee2e019e6d5d27d48a06c3f38e8c..d41ef11747d5392987b4f9dee26902ae159ff844 100644 (file)
@@ -14,6 +14,7 @@ import akka.pattern.Patterns;
 import akka.util.Timeout;
 import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.SettableFuture;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.util.Objects;
 import java.util.Optional;
 import org.opendaylight.mdsal.common.api.CommitInfo;
@@ -85,11 +86,6 @@ class ActorProxyTransactionFacade implements ProxyTransactionFacade {
         return true;
     }
 
-    @Override
-    public void close() {
-        cancel();
-    }
-
     @Override
     public FluentFuture<Optional<NormalizedNode<?, ?>>> read(final LogicalDatastoreType store,
             final YangInstanceIdentifier path) {
@@ -203,21 +199,20 @@ class ActorProxyTransactionFacade implements ProxyTransactionFacade {
 
                 settableFuture.set(CommitInfo.empty());
             }
+
+            private TransactionCommitFailedException newTransactionCommitFailedException(final Throwable failure) {
+                return new TransactionCommitFailedException(String.format("%s: Commit of transaction failed",
+                    getIdentifier()), failure);
+            }
         }, executionContext);
 
         return FluentFuture.from(settableFuture);
     }
 
-    private TransactionCommitFailedException newTransactionCommitFailedException(final Throwable failure) {
-        return new TransactionCommitFailedException(String.format("%s: Commit of transaction failed", getIdentifier()),
-                failure);
-    }
-
+    @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+            justification = "https://github.com/spotbugs/spotbugs/issues/811")
     private Throwable processFailure(final Throwable failure) {
-        if (failure instanceof AskTimeoutException) {
-            return NetconfTopologyUtils.createMasterIsDownException(id, (Exception)failure);
-        }
-
-        return failure;
+        return failure instanceof AskTimeoutException
+                ? NetconfTopologyUtils.createMasterIsDownException(id, (Exception)failure) : failure;
     }
 }