Skip to content

Commit

Permalink
Fix nodesStackSizeWhenUnionStarts not reset
Browse files Browse the repository at this point in the history
  • Loading branch information
HindujaB committed Oct 7, 2024
1 parent ac0b842 commit c5a9a6b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -439,13 +439,15 @@ private void processRecordType(Type targetType) throws ParserException {
private void processJsonAnydataType() {
if (this.nodesStackSizeWhenUnionStarts == this.nodesStack.size()) {
this.targetTypes.remove(this.targetTypes.size() - 1);
this.nodesStackSizeWhenUnionStarts = -1;
}
}

private void processUnionTableFiniteType(Type targetType) {
if (this.nodesStackSizeWhenUnionStarts == this.nodesStack.size()) {
this.targetTypes.remove(this.targetTypes.size() - 1);
this.currentJsonNode = convert(this.currentJsonNode, targetType);
this.nodesStackSizeWhenUnionStarts = -1;
}
}

Expand Down

0 comments on commit c5a9a6b

Please sign in to comment.