- return new RegularFeatureEffectiveStatement(declared, ctx.getSchemaPath().get(), computeFlags(substatements),
- substatements);
- }
-
- @Override
- protected FeatureEffectiveStatement createEmptyEffective(
- final StmtContext<QName, FeatureStatement, FeatureEffectiveStatement> ctx,
- final FeatureStatement declared) {
- return new EmptyFeatureEffectiveStatement(declared, ctx.getSchemaPath().get(), EMPTY_EFFECTIVE_FLAGS);
+ return substatements.isEmpty()
+ ? new EmptyFeatureEffectiveStatement(stmt.declared(), stmt.effectivePath(), EMPTY_EFFECTIVE_FLAGS)
+ : new RegularFeatureEffectiveStatement(stmt.declared(), stmt.effectivePath(),
+ computeFlags(substatements), substatements);