* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.restconf.common.patch;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
*/
public PatchEntity(final String editId, final PatchEditOperation operation, final YangInstanceIdentifier targetNode,
final NormalizedNode<?, ?> node) {
- this.editId = Preconditions.checkNotNull(editId);
- this.operation = Preconditions.checkNotNull(operation);
- this.targetNode = Preconditions.checkNotNull(targetNode);
- this.node = Preconditions.checkNotNull(node);
+ this.editId = requireNonNull(editId);
+ this.operation = requireNonNull(operation);
+ this.targetNode = requireNonNull(targetNode);
+ this.node = requireNonNull(node);
}
/**
*/
public PatchEntity(final String editId, final PatchEditOperation operation,
final YangInstanceIdentifier targetNode) {
- this.editId = Preconditions.checkNotNull(editId);
- this.operation = Preconditions.checkNotNull(operation);
- this.targetNode = Preconditions.checkNotNull(targetNode);
+ this.editId = requireNonNull(editId);
+ this.operation = requireNonNull(operation);
+ this.targetNode = requireNonNull(targetNode);
this.node = null;
}