private static QNameModule getNewQNameModule(final StmtContext<?, ?, ?> targetCtx,
final StmtContext<?, ?, ?> stmtContext) {
- if (targetCtx.isRootContext()) {
+ if (targetCtx.getParentContext() == null) {
return targetCtx.getFromNamespace(ModuleCtxToModuleQName.class, targetCtx);
}
if (targetCtx.getPublicDefinition() == YangStmtMapping.AUGMENT) {