BUG-1704: do not emit separator 39/10939/1
authorRobert Varga <rovarga@cisco.com>
Tue, 9 Sep 2014 12:23:23 +0000 (14:23 +0200)
committerRobert Varga <rovarga@cisco.com>
Tue, 9 Sep 2014 12:23:23 +0000 (14:23 +0200)
When reusing JSONNormalizedNodeStreamWriter, it retains enough state to
know to emit a separator, so if we do it here, we will break the output.

Change-Id: Ie7acc269b4546230fad532f0abf14c0ba6c4121a
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/impl/NormalizedNodeJsonBodyWriter.java

index cfb5e5d..7a879f3 100644 (file)
@@ -101,9 +101,6 @@ public class NormalizedNodeJsonBodyWriter implements MessageBodyWriter<Normalize
             DataContainerChild<? extends PathArgument, ?> child = iterator.next();
             nnWriter.write(child);
             nnWriter.flush();
             DataContainerChild<? extends PathArgument, ?> child = iterator.next();
             nnWriter.write(child);
             nnWriter.flush();
-            if(iterator.hasNext()) {
-                outputWriter.write(",");
-            }
         }
     }
 
         }
     }