Cleanup RemoteDOMRpcFuture 97/51197/2
authorRobert Varga <rovarga@cisco.com>
Tue, 17 Jan 2017 14:56:22 +0000 (15:56 +0100)
committerRobert Varga <rovarga@cisco.com>
Mon, 30 Jan 2017 20:20:13 +0000 (21:20 +0100)
Add a missing space and make mapException() static.

Change-Id: I4e9c33899bff7e0488dbe8537f4e832e50a3c53e
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit aead44997ca7c9bf31be83ebcdd6b01aed23b8f3)

opendaylight/md-sal/sal-remoterpc-connector/src/main/java/org/opendaylight/controller/remote/rpc/RemoteDOMRpcFuture.java

index c6b796d26d8d585ce4d67b448fc12264f8966e5a..f6f0d8e49e451a3e45d0dd54827fbd7fcc019762 100644 (file)
@@ -38,7 +38,7 @@ class RemoteDOMRpcFuture extends AbstractFuture<DOMRpcResult> implements Checked
     private final QName rpcName;
 
     private RemoteDOMRpcFuture(final QName rpcName) {
-        this.rpcName = Preconditions.checkNotNull(rpcName,"rpcName");
+        this.rpcName = Preconditions.checkNotNull(rpcName, "rpcName");
     }
 
     public static RemoteDOMRpcFuture create(final QName rpcName) {
@@ -76,12 +76,12 @@ class RemoteDOMRpcFuture extends AbstractFuture<DOMRpcResult> implements Checked
         }
     }
 
-    private DOMRpcException mapException(final ExecutionException e) {
-        final Throwable cause = e.getCause();
+    private static DOMRpcException mapException(final ExecutionException ex) {
+        final Throwable cause = ex.getCause();
         if (cause instanceof DOMRpcException) {
             return (DOMRpcException) cause;
         }
-        return new RemoteDOMRpcException("Exception during invoking RPC", e);
+        return new RemoteDOMRpcException("Exception during invoking RPC", ex);
     }
 
     private final class FutureUpdater extends OnComplete<Object> {