Take advantage of YangInstanceIdentifier methods
[controller.git] / opendaylight / md-sal / sal-netconf-connector / src / main / java / org / opendaylight / controller / sal / connect / netconf / util / NetconfMessageTransformUtil.java
index 1da39cf751cba27b999642c20da9d7659a45a728..d9121fb42697c7bb0e28359ffdf4718530c6e5f8 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.sal.connect.netconf.util;
 import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import java.io.IOException;
 import java.net.URI;
@@ -73,6 +72,7 @@ public class NetconfMessageTransformUtil {
 
     // Blank document used for creation of new DOM nodes
     private static final Document BLANK_DOCUMENT = XmlUtil.newDocument();
+    public static final String EVENT_TIME = "eventTime";
 
     private NetconfMessageTransformUtil() {}
 
@@ -264,7 +264,7 @@ public class NetconfMessageTransformUtil {
                                                                      final Optional<ModifyAction> operation, final Optional<NormalizedNode<?, ?>> lastChildOverride) {
         final NormalizedNode<?, ?> configContent;
 
-        if(Iterables.isEmpty(dataPath.getPathArguments())) {
+        if (dataPath.isEmpty()) {
             Preconditions.checkArgument(lastChildOverride.isPresent(), "Data has to be present when creating structure for top level element");
             Preconditions.checkArgument(lastChildOverride.get() instanceof DataContainerChild<?, ?>,
                     "Data has to be either container or a list node when creating structure for top level element, but was: %s", lastChildOverride.get());