Merge "Fix raw references to SimpleNode"
authorTony Tkacik <ttkacik@cisco.com>
Mon, 10 Nov 2014 10:50:16 +0000 (10:50 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 10 Nov 2014 10:50:16 +0000 (10:50 +0000)
opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/xml/codec/XmlUtilsTest.java
opendaylight/md-sal/sal-netconf-connector/src/main/java/org/opendaylight/controller/sal/connect/netconf/util/NetconfMessageTransformUtil.java

index 9a9dd2f9b3c789fc5353fa2b2932841d1da53142..2574bd681eeaf72762a8ff8c047fd0d5567f3390 100644 (file)
@@ -81,13 +81,13 @@ public class XmlUtilsTest {
   @Test
   public void testInputXmlToCompositeNode() {
     CompositeNode node = XmlUtils.inputXmlToCompositeNode(testRpc.getQName(), XML_CONTENT, schema);
-    ImmutableList<SimpleNode> input = (ImmutableList)node.getValue().get(0).getValue();
-    SimpleNode firstNode = input.get(0);
+    ImmutableList<SimpleNode<?>> input = (ImmutableList<SimpleNode<?>>)node.getValue().get(0).getValue();
+    SimpleNode<?> firstNode = input.get(0);
 
     Assert.assertEquals("id", firstNode.getNodeType().getLocalName());
     Assert.assertEquals("flowid", firstNode.getValue());
 
-    SimpleNode secondNode = input.get(1);
+    SimpleNode<?> secondNode = input.get(1);
     Assert.assertEquals("flow", secondNode.getNodeType().getLocalName());
 
     YangInstanceIdentifier instance = (YangInstanceIdentifier) secondNode.getValue();
index 2e5f8078a377e980d88e7c52e337f4fb265108e2..6117a216cdf1d4a79861ab775ebe985fb3ab2b6c 100644 (file)
@@ -118,7 +118,7 @@ public class NetconfMessageTransformUtil {
     static Node<?> toNode(final YangInstanceIdentifier.NodeIdentifierWithPredicates argument, final Node<?> node) {
         final List<Node<?>> list = new ArrayList<>();
         for (final Map.Entry<QName, Object> arg : argument.getKeyValues().entrySet()) {
-            list.add(new SimpleNodeTOImpl(arg.getKey(), null, arg.getValue()));
+            list.add(new SimpleNodeTOImpl<>(arg.getKey(), null, arg.getValue()));
         }
         if (node != null) {
             list.add(node);