Fix findbugs violations in md-sal - part 2
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / broker / impl / PingPongFuture.java
index fd8f93b67dab930e71ee17ed64570f9639878a9a..63aba6e5f729267ac39340ab4e364bc8f8df6c1c 100644 (file)
@@ -22,10 +22,11 @@ final class PingPongFuture extends AbstractCheckedFuture<Void, TransactionCommit
 
     @Override
     protected TransactionCommitFailedException mapException(final Exception exception) {
 
     @Override
     protected TransactionCommitFailedException mapException(final Exception exception) {
-        if (exception.getCause() instanceof TransactionCommitFailedException) {
-            return (TransactionCommitFailedException) exception.getCause();
+        final Throwable cause = exception.getCause();
+        if (cause instanceof TransactionCommitFailedException) {
+            return (TransactionCommitFailedException) cause;
         } else {
         } else {
-            return new TransactionCommitFailedException(exception.getMessage(), exception.getCause());
+            return new TransactionCommitFailedException(exception.getMessage(), cause);
         }
     }
 }
         }
     }
 }