Fix submodule resource resolution 06/96306/5
authorIvan Hrasko <ivan.hrasko@pantheon.tech>
Thu, 20 May 2021 10:25:37 +0000 (12:25 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 20 May 2021 18:33:14 +0000 (20:33 +0200)
commit4953f546936b065be8c1e68208d79f2f24180e7c
tree833c321ba8d5543060cd6a063886d256b2fc1f43
parent4d8b3f35e99e0aa0bb47e4634a672578cd670cac
Fix submodule resource resolution

Initial integration with yangtools-6.0.0 has changed the resource
resolution logic. Unfortunately the lambda instroduced in
Ifa9780fbdfb411b4613df0ee18407d85e81bd517 incorrectly passed 'module'
and not the requested entity to the resolver -- leading to all
submodules to open their module's resource instead.

Fix the lambda and also add proper asserts to check resources are being
open correctly.

JIRA: MDSAL-663
Change-Id: I293f20c15426490a97bb70b4303f0c7b23114c82
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 18ac80f3b2ff56bc734d236ba38d9cd14c5f06d7)
binding/maven-sal-api-gen-plugin/src/main/java/org/opendaylight/mdsal/binding/maven/api/gen/plugin/CodeGeneratorImpl.java
binding/maven-sal-api-gen-plugin/src/test/java/org/opendaylight/mdsal/binding/yang/unified/doc/generator/maven/YangModuleInfoCompilationTest.java