this.original = ctx.getOriginalCtx() == null ? null : (LeafListSchemaNode) ctx.getOriginalCtx()
.buildEffective();
- final TypeEffectiveStatement<?> typeStmt = firstSubstatementOfType(TypeEffectiveStatement.class);
- if (typeStmt == null) {
- throw new SourceException("Leaf-list is missing a 'type' statement", ctx.getStatementSourceReference());
- }
+ final TypeEffectiveStatement<?> typeStmt = SourceException.throwIfNull(
+ firstSubstatementOfType(TypeEffectiveStatement.class), ctx.getStatementSourceReference(),
+ "Leaf-list is missing a 'type' statement");
final ConcreteTypeBuilder<?> builder = ConcreteTypes.concreteTypeBuilder(typeStmt.getTypeDefinition(),
ctx.getSchemaPath().get());
@Override
public String toString() {
- StringBuilder sb = new StringBuilder(LeafListEffectiveStatementImpl.class.getSimpleName());
- sb.append("[");
- sb.append(getQName());
- sb.append("]");
- return sb.toString();
+ return LeafListEffectiveStatementImpl.class.getSimpleName() + "[" +
+ getQName() +
+ "]";
}
}