summaryrefslogtreecommitdiffstats
path: root/vpp-integration/api-docs/core/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-integration/api-docs/core/src/main/java')
-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) {