summaryrefslogtreecommitdiffstats
path: root/vpp-integration/api-docs/core/src/main/java/io
diff options
context:
space:
mode:
authorMichal Cmarada <michal.cmarada@pantheon.tech>2018-09-25 11:21:09 +0200
committerMichal Cmarada <mcmarada@cisco.com>2018-09-28 12:54:22 +0200
commit5bbd9feb84660d06fe635a0cd4cbdf45b110665c (patch)
tree934a3fb9159f832cce5cfbbfd03f9d68c306bf33 /vpp-integration/api-docs/core/src/main/java/io
parent9b0967210e3e50d0b52475cfc02e636dbfa28421 (diff)
Fix bugs after bumping to Fluorine ODL dependencies (HONEYCOMB-433)
Change-Id: I99b630f97144770849679a04efccaf7fc9868cb6 Signed-off-by: Michal Cmarada <michal.cmarada@pantheon.tech>
Diffstat (limited to 'vpp-integration/api-docs/core/src/main/java/io')
-rw-r--r--vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java2
-rw-r--r--vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java11
2 files changed, 9 insertions, 4 deletions
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
index 9fd5976b7..f12c2e606 100644
--- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
+++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/ModelTypeIndex.java
@@ -41,7 +41,7 @@ class ModelTypeIndex {
ModelTypeIndex() throws IOException {
namespaceToModuleIndex = collectAllModules(this.getClass().getClassLoader())
.stream()
- .collect(toMap(YangModelKey::new, YangModuleInfo::getName));
+ .collect(toMap(YangModelKey::new, yangModuleInfo -> yangModuleInfo.getName().toString()));
}
private static YangModelBindingProvider getModuleBindingProviderInstance(final Class<?> aClass) {
diff --git a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
index 2bc5bc5da..a2d4b9d06 100644
--- a/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
+++ b/vpp-integration/api-docs/core/src/main/java/io/fd/hc2vpp/docs/core/YangModelKey.java
@@ -14,15 +14,20 @@
* limitations under the License.
*/
-package io.fd.hc2vpp.docs.core;import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+package io.fd.hc2vpp.docs.core;
+
+import java.util.Optional;
+import org.opendaylight.yangtools.yang.binding.YangModuleInfo;
+import org.opendaylight.yangtools.yang.common.Revision;
final class YangModelKey {
private final String namespace;
private final String revision;
YangModelKey(final YangModuleInfo moduleInfo) {
- this.namespace = moduleInfo.getNamespace();
- this.revision = moduleInfo.getRevision();
+ this.namespace = moduleInfo.getName().getNamespace().toString();
+ Optional<Revision> optRevision = moduleInfo.getName().getRevision();
+ this.revision = optRevision.isPresent() ? optRevision.get().toString() : "";
}
YangModelKey(final String namespace, final String revision) {