Create NetconfDataTreeService with base and additional operations for netconf
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / SubscribeToStreamUtil.java
index f52eab5b737a0f4c6e8d0f30389ded7081bb1c27..b6897539254c7d387ffb1be36b469d0145c8aeac 100644 (file)
@@ -277,7 +277,7 @@ final class SubscribeToStreamUtil {
     private static Map<String, String> mapValuesFromUri(final String identifier) {
         final HashMap<String, String> result = new HashMap<>();
         for (final String token : RestconfConstants.SLASH_SPLITTER.split(identifier)) {
-            final String[] paramToken = token.split(String.valueOf(RestconfStreamsConstants.EQUAL));
+            final String[] paramToken = token.split("=");
             if (paramToken.length == 2) {
                 result.put(paramToken[0], paramToken[1]);
             }
@@ -298,8 +298,7 @@ final class SubscribeToStreamUtil {
                 // Unsecured HTTP and others go to unsecured WebSockets
                 uriBuilder.scheme("ws");
         }
-        return uriBuilder.replacePath(RestconfConstants.BASE_URI_PATTERN + RestconfConstants.SLASH + streamName)
-                .build();
+        return uriBuilder.replacePath(RestconfConstants.BASE_URI_PATTERN + '/' + streamName).build();
     }
 
     /**
@@ -329,7 +328,6 @@ final class SubscribeToStreamUtil {
 
     static boolean checkExist(final SchemaContext schemaContext,
                               final DOMDataTreeReadOperations readWriteTransaction) {
-        boolean exist;
         try {
             return readWriteTransaction.exists(LogicalDatastoreType.OPERATIONAL,
                     IdentifierCodec.deserialize(MonitoringModule.PATH_TO_STREAMS, schemaContext)).get();