*/
package org.opendaylight.restconf.nb.rfc8040.streams.listeners;
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkState;
+import static java.util.Objects.requireNonNull;
+
import com.google.common.base.MoreObjects;
-import com.google.common.base.Preconditions;
import java.io.IOException;
import java.time.Instant;
import java.util.Collection;
final NotificationOutputType outputType) {
setLocalNameOfPath(path.getLastPathArgument().getNodeType().getLocalName());
- this.outputType = Preconditions.checkNotNull(outputType);
- this.path = Preconditions.checkNotNull(path);
- Preconditions.checkArgument(streamName != null && !streamName.isEmpty());
- this.streamName = streamName;
+ this.outputType = requireNonNull(outputType);
+ this.path = requireNonNull(path);
+ this.streamName = requireNonNull(streamName);
+ checkArgument(!streamName.isEmpty());
}
@Override
.append(normalizedNode.getIdentifier()).build();
final Optional<DataSchemaContextNode<?>> childrenSchemaNode = dataSchemaContextTree.findChild(yiid);
- Preconditions.checkState(childrenSchemaNode.isPresent());
+ checkState(childrenSchemaNode.isPresent());
boolean isNodeMixin = childrenSchemaNode.get().isMixin();
boolean isSkippedNonLeaf = getLeafNodesOnly() && !(normalizedNode instanceof LeafNode);
if (!isNodeMixin && !isSkippedNonLeaf) {
try {
SchemaPath nodePath;
final Optional<DataSchemaContextNode<?>> childrenSchemaNode = dataSchemaContextTree.findChild(eventPath);
- Preconditions.checkState(childrenSchemaNode.isPresent());
+ checkState(childrenSchemaNode.isPresent());
if (normalized instanceof MapEntryNode || normalized instanceof UnkeyedListEntryNode) {
nodePath = childrenSchemaNode.get().getDataSchemaNode().getPath();
} else {