Cleanup SchemaNodeIdentifierBuildNamespace 19/47419/3
authorRobert Varga <rovarga@cisco.com>
Mon, 24 Oct 2016 13:50:09 +0000 (15:50 +0200)
committerRobert Varga <nite@hq.sk>
Tue, 25 Oct 2016 14:25:43 +0000 (14:25 +0000)
Remove unnecessary branches.

Change-Id: I151c304ed2a2790181f0152fa95c811ab031bfd8
Signed-off-by: Robert Varga <rovarga@cisco.com>
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;
     }