Skip to content

Commit

Permalink
[#1965] Replaced nonNull with requireNonNull, so we have an exception…
Browse files Browse the repository at this point in the history
… in the constructor in case the list have null elements
  • Loading branch information
api-from-the-ion authored and jmartisk committed Nov 15, 2023
1 parent b19c846 commit 9f988f7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public GraphQLClientException(String message, GraphQLError error) {

public GraphQLClientException(String message, List<GraphQLError> errors) {
super(message);
this.errors = requireNonNull(errors).stream().filter(Objects::nonNull).collect(Collectors.toList());
this.errors = requireNonNull(errors).stream().map(Objects::requireNonNull).collect(Collectors.toList());
}

@Override
Expand Down

0 comments on commit 9f988f7

Please sign in to comment.