BUG-4688: eliminate SimpleDateFormatUtil.DEFAULT_DATE_REV
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / ModuleEffectiveStatementImpl.java
index c7f7d143d81134831b12a11a258990fbe378bc60..57f4640b1de11dcd159730e12c6c0a82442489d2 100644 (file)
@@ -7,9 +7,9 @@
  */
 package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
 
+import com.google.common.base.Verify;
 import java.util.Objects;
 import org.opendaylight.yangtools.yang.common.QNameModule;
-import org.opendaylight.yangtools.yang.common.SimpleDateFormatUtil;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.ModuleStatement;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
@@ -22,12 +22,7 @@ public final class ModuleEffectiveStatementImpl extends AbstractEffectiveModule<
             final StmtContext<String, ModuleStatement, EffectiveStatement<String, ModuleStatement>> ctx) {
         super(ctx);
 
-        final QNameModule module = ctx.getFromNamespace(ModuleCtxToModuleQName.class, ctx);
-        if (module.getRevision() == null) {
-            qnameModule = QNameModule.create(module.getNamespace(), SimpleDateFormatUtil.DEFAULT_DATE_REV).intern();
-        } else {
-            qnameModule = module;
-        }
+        qnameModule = Verify.verifyNotNull(ctx.getFromNamespace(ModuleCtxToModuleQName.class, ctx));
     }
 
     @Override