Fix NPE on reading data
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / TransactionProxy.java
index c12276134e99c0bff0e9f3dc6c3d61550c39e4ad..00196ebd078e37f9778f94af9e8ab3a47dd9bb53 100644 (file)
@@ -91,6 +91,9 @@ public class TransactionProxy implements DOMStoreReadWriteTransaction {
                         ActorContext.ASK_DURATION);
                 if(response instanceof ReadDataReply){
                     ReadDataReply reply = (ReadDataReply) response;
+                    if(reply.getNormalizedNode() == null){
+                        return Optional.absent();
+                    }
                     //FIXME : A cast should not be required here ???
                     return (Optional<NormalizedNode<?, ?>>) Optional.of(reply.getNormalizedNode());
                 }