Cleanup SchemaNodeIdentifierBuildNamespace
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / SchemaNodeIdentifierBuildNamespace.java
index d33df59d97d0c981bd3296bb14f7e140873fdc88..c354ac310925674e64463cd7e8ee70baf7649f82 100644 (file)
@@ -50,9 +50,8 @@ public class SchemaNodeIdentifierBuildNamespace extends
         if (!iterator.hasNext()) {
             if (lookupStartStorage instanceof StmtContext<?, ?, ?>) {
                 return (StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>>) lookupStartStorage;
-            } else {
-                return null;
             }
+            return null;
         }
         QName nextPath = iterator.next();
         StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>> current = (StmtContext.Mutable<?, ?, EffectiveStatement<?, ?>>) lookupStartStorage
@@ -66,9 +65,8 @@ public class SchemaNodeIdentifierBuildNamespace extends
                     .getFromNamespace(ChildSchemaNodes.class, nextPath);
             if (nextNodeCtx == null) {
                 return tryToFindUnknownStatement(nextPath.getLocalName(), current);
-            } else {
-                current = nextNodeCtx;
             }
+            current = nextNodeCtx;
         }
         return current;
     }