Fix NPE after invoking of GET on /rests/data
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / impl / RestconfDataServiceImpl.java
index 5e21c2c3cf2e36ee4034391de576cd5a51af0d4a..55f3cd8ee1495a620974f53ac2aac6270c175574 100644 (file)
@@ -149,7 +149,7 @@ public class RestconfDataServiceImpl implements RestconfDataService {
         final NormalizedNode<?, ?> node =
                 ReadDataTransactionUtil.readData(identifier, parameters.getContent(), transactionNode, withDefa,
                         schemaContextRef, uriInfo);
-        if (identifier.contains(STREAM_PATH) && identifier.contains(STREAM_ACCESS_PATH_PART)
+        if (identifier != null && identifier.contains(STREAM_PATH) && identifier.contains(STREAM_ACCESS_PATH_PART)
                 && identifier.contains(STREAM_LOCATION_PATH_PART)) {
             final String value = (String) node.getValue();
             final String streamName = value.substring(