Optimizations, Monitoring and Logging
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / CompositeModificationPayload.java
index abc69f18975aeb671713e955e11498f1c7d55050..d0abb20718bd87dfc13f862bbe6f4672878abc35 100644 (file)
@@ -29,7 +29,7 @@ public class CompositeModificationPayload extends Payload implements
         modification = null;
     }
     public CompositeModificationPayload(Object modification){
-        this.modification = (PersistentMessages.CompositeModification) modification;
+        this.modification = (PersistentMessages.CompositeModification) Preconditions.checkNotNull(modification, "modification should not be null");
     }
 
     @Override public Map<GeneratedMessage.GeneratedExtension, PersistentMessages.CompositeModification> encode() {