Move Utils.belongsToTheSameModule() 28/65428/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 11 Nov 2017 11:12:34 +0000 (12:12 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 13 Nov 2017 10:39:43 +0000 (11:39 +0100)
There is only one call site which uses this utility, inline it
there.

Change-Id: Iec3145336f4050046715fd0754934d5c0bdd284a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/augment/AbstractAugmentStatementSupport.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/Utils.java

index d7a11c77c97cfe5ae4911d03c7e3e734465a25d5..026c808cdf1478a61349cd6fe9a317707813b371 100644 (file)
@@ -290,10 +290,9 @@ abstract class AbstractAugmentStatementSupport extends AbstractStatementSupport<
                     "Argument of augment target statement must be QName.");
             final QName targetStmtQName = (QName) targetCtx.getStatementArgument();
             /*
-             * If target is from another module, return true and perform
-             * mandatory nodes validation
+             * If target is from another module, return true and perform mandatory nodes validation
              */
-            if (!Utils.belongsToTheSameModule(targetStmtQName, sourceStmtQName)) {
+            if (!targetStmtQName.getModule().equals(sourceStmtQName.getModule())) {
                 return true;
             }
 
index de75763e0c7af8dfd4ce6216e03cebf16f6859ce..b0e3190e928112e36c03537fbcb37b5108d402b9 100644 (file)
@@ -297,8 +297,4 @@ public final class Utils {
 
         return string;
     }
-
-    public static boolean belongsToTheSameModule(final QName targetStmtQName, final QName sourceStmtQName) {
-        return targetStmtQName.getModule().equals(sourceStmtQName.getModule());
-    }
 }