Allow StatementMap to be resized to correct size
[yangtools.git] / yang / yang-parser-reactor / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / StatementContextWriter.java
index 6a50a43bd0cfb6ca7ee62ecf17a23bf6cbe9b65e..15f2d4f6e26b536bca5eda973329700b00dd3ec6 100644 (file)
@@ -48,6 +48,7 @@ final class StatementContextWriter implements StatementWriter {
     public void storeStatement(final int expectedChildren, final boolean fullyDefined) {
         Preconditions.checkState(current != null);
         Preconditions.checkArgument(expectedChildren >= 0);
+        current.resizeSubstatements(expectedChildren);
 
         if (fullyDefined) {
             current.setFullyDefined();