Remove duplicate checkState() 41/86641/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 21:18:16 +0000 (22:18 +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>
(cherry picked from commit d3700afdd16b8f486e4d401e07649dc76aa8e1bf)

yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/util/SchemaContextUtil.java

index 2dffbdd4c45a6e294d0cf461fdfee1a3b9dcf278..0850265d5e19a35ffe31c6c4c4d15a6305bab1c1 100644 (file)
@@ -656,8 +656,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();