Remove duplicate checkState() 25/86625/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Dec 2019 11:54:00 +0000 (12:54 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 30 Dec 2019 12:12:53 +0000 (13:12 +0100)
The only caller already checks for the path being absolute, there
is no need to check twice.

Change-Id: I24a038ccfe73b47ceaa13e65f3ea3b74c1a3176f
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 c2b8a4e24545294829942d2293a0a7718cd594bb..073709792f938b54c488ff38d77c98959d57f85d 100644 (file)
@@ -654,8 +654,6 @@ public final class SchemaContextUtil {
      */
     private static @Nullable SchemaNode resolveRelativeXPath(final SchemaContext context, final Module module,
             final PathExpression relativeXPath, final SchemaNode actualSchemaNode) {
-        checkState(!relativeXPath.isAbsolute(), "Revision Aware XPath MUST be relative i.e. MUST contains ../, "
-                + "for non relative Revision Aware XPath use findDataSchemaNode method");
         checkState(actualSchemaNode.getPath() != null, "Schema Path reference for Leafref cannot be NULL");
 
         final String orig = relativeXPath.getOriginalString();