GET on /rests/operations with json always fails with 500 73/79473/1
authorTomas Cere <tomas.cere@pantheon.tech>
Fri, 11 Jan 2019 12:20:41 +0000 (13:20 +0100)
committerJakub Morvay <jakub.morvay@gmail.com>
Fri, 11 Jan 2019 13:20:31 +0000 (13:20 +0000)
Stop throwing UnsupportedOperationException in FakeContainerSchemaNode
isPresence() method, since this container is only used for get on /rests/operations
we can assume this container is not a presence container.

JIRA: NETCONF-593
Change-Id: I06692da9d77e4230f32aa19aa25989ab72dd114a
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/services/simple/impl/FakeContainerSchemaNode.java

index db1641618a11129b7c26aa2c0b2c619df1a9010a..2b7538fb97e83cae49db0e4e8cbb9dd237409737 100644 (file)
@@ -127,7 +127,8 @@ class FakeContainerSchemaNode implements ContainerSchemaNode {
 
     @Override
     public boolean isPresenceContainer() {
-        throw new UnsupportedOperationException("Not supported.");
+        // since this is a special case container used only for operations this is not a presence container.
+        return false;
     }
 
     @Override