Make RuntimeRpc revision aware
[netconf.git] / netconf / mdsal-netconf-connector / src / main / java / org / opendaylight / netconf / mdsal / connector / ops / RuntimeRpc.java
index 6d4ba4305ae99a1799d5e8ed90f768e76f44172a..669eb1fe121b4db824fe7a144dbec7839d2f4527 100644 (file)
@@ -106,7 +106,7 @@ public class RuntimeRpc extends AbstractSingletonNetconfOperation {
 
     //this returns module with the newest revision if more then 1 module with same namespace is found
     private Optional<Module> getModule(final URI namespaceURI) {
-        return Optional.fromJavaUtil(schemaContext.getCurrentContext().findModule(namespaceURI));
+        return Optional.fromJavaUtil(schemaContext.getCurrentContext().findModules(namespaceURI).stream().findFirst());
     }
 
     private static Optional<RpcDefinition> getRpcDefinitionFromModule(final Module module, final URI namespaceURI,