Remove impossible checkArgument()s 67/81167/3
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Mar 2019 10:25:54 +0000 (11:25 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Mar 2019 10:58:38 +0000 (11:58 +0100)
Private methods' callers are ensuring these cannot trigger, remove
them.

Change-Id: I6783c348ef15866fc34173940fa8ad6d8346887e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java

index e2d80cded12e3966e08b37b2614b302b304ef43c..c2535223dcb61651e7d70c315139a10272a11f76 100644 (file)
@@ -337,9 +337,6 @@ public final class SchemaContextUtil {
     }
 
     private static SchemaNode findNodeInModule(final Module module, final Iterable<QName> path) {
-        checkArgument(module != null, "Parent reference cannot be NULL");
-        checkArgument(path != null, "Path reference cannot be NULL");
-
         if (!path.iterator().hasNext()) {
             LOG.debug("No node matching {} found in node {}", path, module);
             return null;
@@ -382,13 +379,9 @@ public final class SchemaContextUtil {
         }
 
         return foundNode;
-
     }
 
     private static SchemaNode findNodeIn(final SchemaNode parent, final Iterable<QName> path) {
-        checkArgument(parent != null, "Parent reference cannot be NULL");
-        checkArgument(path != null, "Path reference cannot be NULL");
-
         if (!path.iterator().hasNext()) {
             LOG.debug("No node matching {} found in node {}", path, parent);
             return null;