protected LeafListEffectiveStatement createEffective(final Current<QName, LeafListStatement> stmt,
final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
final TypeEffectiveStatement<?> typeStmt = SourceException.throwIfNull(
- findFirstStatement(substatements, TypeEffectiveStatement.class), stmt.sourceReference(),
+ findFirstStatement(substatements, TypeEffectiveStatement.class), stmt,
"Leaf-list is missing a 'type' statement");
- final SchemaPath path = stmt.getSchemaPath();
final LeafListSchemaNode original = (LeafListSchemaNode) stmt.original();
final int flags = new FlagsBuilder()
// FIXME: We need to interpret the default value in terms of supplied element type
SourceException.throwIf(
EffectiveStmtUtils.hasDefaultValueMarkedWithIfFeature(stmt.yangVersion(), typeStmt, defaultValues),
- stmt.sourceReference(),
- "Leaf-list '%s' has one of its default values '%s' marked with an if-feature statement.",
+ stmt, "Leaf-list '%s' has one of its default values '%s' marked with an if-feature statement.",
stmt.argument(), defaultValues);
// FIXME: RFC7950 section 7.7.4: we need to check for min-elements and defaultValues conflict
EffectiveStmtUtils.createElementCountConstraint(substatements);
final LeafListStatement declared = stmt.declared();
+ final SchemaPath path = stmt.wrapSchemaPath();
if (defaultValues.isEmpty()) {
return original == null && !elementCountConstraint.isPresent()
? new EmptyLeafListEffectiveStatement(declared, path, flags, substatements)