From 99561178c9c0ed7facddb49cc504ad6734e56e65 Mon Sep 17 00:00:00 2001 From: Evan Zeller Date: Wed, 27 Sep 2017 18:15:31 -0700 Subject: [PATCH] BUG-9132: don't provide a value for restconf/streams/events The yang type of events leaf is 'type empty', meaning there should be no value. As of Carbon performing a GET on restconf/streams causes a cast exception due to the empty string value here. See EmptyJSONCodec in yangtools. Change-Id: If0501b9c5459f4255096a4f070968c87a749407e Signed-off-by: Evan Zeller (cherry picked from commit 9ae46c73bc2437dc1dab54498b3a64c0600fa9e8) --- .../opendaylight/netconf/sal/restconf/impl/RestconfImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java index 38dc35be2f..e86bbd1dee 100644 --- a/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/netconf/sal/restconf/impl/RestconfImpl.java @@ -1492,7 +1492,7 @@ public class RestconfImpl implements RestconfService { instanceDataChildrenByName = ControllerContext.findInstanceDataChildrenByName(listStreamSchemaNode, "events"); final DataSchemaNode eventsSchemaNode = Iterables.getFirst(instanceDataChildrenByName, null); Preconditions.checkState(eventsSchemaNode instanceof LeafSchemaNode); - streamNodeValues.withChild(Builders.leafBuilder((LeafSchemaNode) eventsSchemaNode).withValue("").build()); + streamNodeValues.withChild(Builders.leafBuilder((LeafSchemaNode) eventsSchemaNode).build()); return streamNodeValues.build(); } -- 2.36.6