Skip to content

Commit

Permalink
fix(spoon): Fix NPE in ConstructorMatcher (#813)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Jul 10, 2023
1 parent 30ab7df commit 72e3525
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ public boolean matches(CtConstructorCall<?> element) {
if (element.getArguments().size() != argsFQN.length) {
return false;
}

if (element.getArguments().stream().anyMatch(arg -> arg.getType() == null)) {
return false;
}
List<Pair<CtTypeReference<?>, CtExpression<?>>> zipped = new ArrayList<>();
for (int i = 0; i < argsFQN.length && i < element.getArguments().size(); i++) {
zipped.add(Pair.of(
Expand Down

0 comments on commit 72e3525

Please sign in to comment.