Remove RevisionSourceIdentifier
[yangtools.git] / parser / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / import_ / ImportStatementSupport.java
index 188ef4446a4bfce69d84ae3a09ffff5266dc80e5..f5beef4fd3dc0a598db4bfa8b4ac0064e45115af 100644 (file)
@@ -106,7 +106,7 @@ public final class ImportStatementSupport
 
                 final Mutable<?, ?, ?> root = rootPrereq.resolve(ctx);
                 // Version 1 sources must not import-by-revision Version 1.1 modules
-                if (importId.getRevision().isPresent() && root.yangVersion() == YangVersion.VERSION_1) {
+                if (importId.revision() != null && root.yangVersion() == YangVersion.VERSION_1) {
                     final YangVersion importedVersion = importedModuleContext.yangVersion();
                     if (importedVersion != YangVersion.VERSION_1) {
                         throw new YangVersionLinkageException(stmt, "Cannot import by revision version %s module %s",