Fix Module.getVersion()
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / util / ModuleDependencySort.java
index a424e70e391525a369373c9d37b27271bb177a0d..8bdd17c80d80ffe2b10524a187524f9bc70a7c64 100644 (file)
@@ -133,7 +133,7 @@ public final class ModuleDependencySort {
                  * If it is an yang 1 module, check imports: If module is imported twice with different
                  * revisions then throw exception
                  */
-                if (YangVersion.VERSION_1.toString().equals(module.getYangVersion())) {
+                if (module.getYangVersion() == YangVersion.VERSION_1) {
                     final Date impRevision = imported.get(toName);
                     if (impRevision != null && !impRevision.equals(toRevision)
                         && !DEFAULT_DATE_REV.equals(impRevision) && !DEFAULT_DATE_REV.equals(toRevision)) {