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 a547eb08911dd9b2d7b58e399cba6e9559ad20f1..9dc455c0516c67fc012f1b3c7b2198368df9030a 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;
@@ -279,7 +278,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());