Fix modernization issues
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / persisted / AbstractDataTreeCandidateNode.java
index 6c6a5af7545225cdfc86a42ab7e251786e64e515..8ef201c314aa6a280129e1fce4b8a1a0a31cdf07 100644 (file)
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.controller.cluster.datastore.persisted;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import java.util.Collection;
 import java.util.Optional;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
@@ -26,11 +27,11 @@ abstract class AbstractDataTreeCandidateNode implements DataTreeCandidateNode {
     private final ModificationType type;
 
     protected AbstractDataTreeCandidateNode(final ModificationType type) {
-        this.type = Preconditions.checkNotNull(type);
+        this.type = requireNonNull(type);
     }
 
     @Override
-    public final DataTreeCandidateNode getModifiedChild(final PathArgument identifier) {
+    public final Optional<DataTreeCandidateNode> getModifiedChild(final PathArgument identifier) {
         throw new UnsupportedOperationException("Not implemented");
     }