BUG 3566 : Get remote-rpc working again
[controller.git] / opendaylight / md-sal / sal-remoterpc-connector / src / main / java / org / opendaylight / controller / remote / rpc / RemoteRpcImplementation.java
index a6fdfd3ff97445a2f28cd48e077d66e22fd24f38..23d1e85e23c355721c31e22bda7d6e7232c9cfd1 100644 (file)
@@ -76,8 +76,16 @@ public class RemoteRpcImplementation implements DOMRpcImplementation {
                 }
 
                 final RpcResponse rpcReply = (RpcResponse)reply;
-                final NormalizedNode<?, ?> result =
-                        NormalizedNodeSerializer.deSerialize(rpcReply.getResultNormalizedNode());
+                final NormalizedNode<?, ?> result;
+
+                if(rpcReply.getResultNormalizedNode() == null){
+                    result = null;
+                    LOG.debug("Received response for invoke rpc : {} result is null", rpcMsg.getRpc());
+                } else {
+                    result = NormalizedNodeSerializer.deSerialize(rpcReply.getResultNormalizedNode());
+                    LOG.debug("Received response for invoke rpc : {} result : {}", rpcMsg.getRpc(), result);
+                }
+
                 settableFuture.set(new DefaultDOMRpcResult(result));
             }
         };