From: Robert Varga Date: Tue, 26 Mar 2019 10:25:54 +0000 (+0100) Subject: Remove impossible checkArgument()s X-Git-Tag: v3.0.0~49 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F81167%2F3;p=yangtools.git Remove impossible checkArgument()s Private methods' callers are ensuring these cannot trigger, remove them. Change-Id: I6783c348ef15866fc34173940fa8ad6d8346887e Signed-off-by: Robert Varga --- diff --git a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java index e2d80cded1..c2535223dc 100644 --- a/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java +++ b/yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java @@ -337,9 +337,6 @@ public final class SchemaContextUtil { } private static SchemaNode findNodeInModule(final Module module, final Iterable 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 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;