Fix Revision confusion
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / services / simple / impl / RestconfImpl.java
index bd0942072736c55a82f2833205403c92d4ce46b1..e3db40ba725c62d726dfe600d688cb361c1cf783 100644 (file)
@@ -7,6 +7,7 @@
  */
 package org.opendaylight.restconf.nb.rfc8040.services.simple.impl;
 
+import javax.ws.rs.Path;
 import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
 import org.opendaylight.restconf.common.context.NormalizedNodeContext;
 import org.opendaylight.restconf.nb.rfc8040.Rfc8040.IetfYangLibrary;
@@ -23,9 +24,10 @@ import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 
+@Path("/")
 public class RestconfImpl implements RestconfService {
 
-    private SchemaContextHandler schemaContextHandler;
+    private volatile SchemaContextHandler schemaContextHandler;
 
     public RestconfImpl(final SchemaContextHandler schemaContextHandler) {
         this.schemaContextHandler = schemaContextHandler;
@@ -47,8 +49,8 @@ public class RestconfImpl implements RestconfService {
                 QName.create(RestconfModule.IETF_RESTCONF_QNAME, RestconfModule.LIB_VER_LEAF_SCHEMA_NODE));
         final InstanceIdentifierContext<? extends SchemaNode> iid =
                 new InstanceIdentifierContext<>(yangIId, schemaNode, null, context);
-        final NormalizedNode<?, ?> data =
-                Builders.leafBuilder((LeafSchemaNode) schemaNode).withValue(IetfYangLibrary.REVISION).build();
+        final NormalizedNode<?, ?> data = Builders.leafBuilder((LeafSchemaNode) schemaNode)
+                .withValue(IetfYangLibrary.REVISION.toString()).build();
         return new NormalizedNodeContext(iid, data);
     }