Skip to content

Commit

Permalink
Avoid IndexOutOfBoundsException in lhsUnary (apache#5956)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurloc authored and tkobayas committed Jun 11, 2024
1 parent 5e2a896 commit ef5b3af
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,10 @@ public BaseDescr visitLhsUnary(DRLParser.LhsUnaryContext ctx) {
.build();
children.forEach(andDescr::addDescr);
return andDescr;
} else {
// size == 1. children never be empty
} else if (children.size() == 1) {
return children.get(0);
} else {
return null; // only caused by a parser error
}
}

Expand Down

0 comments on commit ef5b3af

Please sign in to comment.