Migrate users of deprecated QNameModule methods
[yangtools.git] / model / yang-model-export / src / main / java / org / opendaylight / yangtools / yang / model / export / StatementPrefixResolver.java
index 89faf944db7e77c80c9d3c77d04cda3e33715e44..088bdd0161fe9a2325c35f454086b31482ab9e40 100644 (file)
@@ -142,7 +142,7 @@ final class StatementPrefixResolver {
         if (obj != null) {
             return decodeEntry(obj, stmt);
         }
-        if (module.getRevision().isPresent()) {
+        if (module.revision() != null) {
             throw new IllegalArgumentException("Failed to find prefix for statement " + stmt);
         }
 
@@ -155,8 +155,8 @@ final class StatementPrefixResolver {
         Entry<QNameModule, ?> match = null;
         for (var entry : lookup.entrySet()) {
             final var ns = entry.getKey();
-            if (module.equals(ns.withoutRevision()) && (match == null
-                    || Revision.compare(match.getKey().getRevision(), ns.getRevision()) < 0)) {
+            if (module.equals(ns.withoutRevision())
+                && (match == null || Revision.compare(match.getKey().revision(), ns.revision()) < 0)) {
                 match = entry;
             }
         }