Skip to content

Commit

Permalink
hotfix[java-port]: Eliminate possible NPE
Browse files Browse the repository at this point in the history
Signed-off-by: rovo98 <rovo98@163.com>
  • Loading branch information
rovo98 authored and mike-lischke committed Apr 11, 2024
1 parent 60f62a4 commit b5e185f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ private void collectFollowSets(ATNState s, ATNState stopState, LinkedList<Follow
FollowSetWithPath set = new FollowSetWithPath();
set.intervals = IntervalSet.of(Token.EPSILON);
set.path = new LinkedList<Integer>(ruleStack);
set.following = new LinkedList<Integer>();
followSets.addLast(set);
return;
}
Expand All @@ -362,6 +363,7 @@ private void collectFollowSets(ATNState s, ATNState stopState, LinkedList<Follow
FollowSetWithPath set = new FollowSetWithPath();
set.intervals = IntervalSet.of(Token.MIN_USER_TOKEN_TYPE, this.atn.maxTokenType);
set.path = new LinkedList<Integer>(ruleStack);
set.following = new LinkedList<Integer>();
followSets.addLast(set);
} else {
IntervalSet label = transition.label();
Expand Down

0 comments on commit b5e185f

Please sign in to comment.