Hotfix for gson test. 53/10453/1
authorLukas Sedlak <lsedlak@cisco.com>
Thu, 28 Aug 2014 14:10:27 +0000 (16:10 +0200)
committerLukas Sedlak <lsedlak@cisco.com>
Thu, 28 Aug 2014 14:10:27 +0000 (16:10 +0200)
Test had to be modified prior to internal use of hash sets. Test relied on retrieving first item from
parsedData values. That lead to test failure on various platforms. Now test should run without problems.

Change-Id: Icaa920645c0e12bc922eef131b89e27d7a6b213f
Signed-off-by: Lukas Sedlak <lsedlak@cisco.com>
yang/yang-data-codec-gson/src/test/java/org/opendaylight/yangtools/yang/data/codec/gson/StreamToNormalizedNodeTest.java

index 1b5ad40f29a9eaa377e7cd7ba09c55e50b4b0feb..06f661dd1fa04fd32e46ae652a11a80d100a3e28 100644 (file)
@@ -104,7 +104,7 @@ public class StreamToNormalizedNodeTest {
          * This is the serialization part.
          */
         // We want to write the first child out
-        final DataContainerChild<? extends PathArgument, ?> firstChild = ((ContainerNode) parsedData).getValue().iterator().next();
+        final DataContainerChild<? extends PathArgument, ?> firstChild = (DataContainerChild<? extends PathArgument, ?>) parsedData;
         LOG.debug("Serializing first child: {}", firstChild);
 
         // String holder