Make RuntimeRpc revision aware
[netconf.git] / netconf / mdsal-netconf-connector / src / main / java / org / opendaylight / netconf / mdsal / connector / ops / RuntimeRpc.java
index a2f8c1b6ef3d6f86bee692b606c9689ef2aa1cd9..55c1533d57db5483404c6d9d1ab1844007330306 100644 (file)
@@ -105,7 +105,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,