Skip to content

Conversation

@catap
Copy link
Contributor

@catap catap commented Jul 6, 2022

Java's ArrayList.toArray() returns provided array when collection is empty.

Here is created a one-element array which contains null element.

Thus, returned BulkResponse may contains a null element as BulkItemResponse.

How to achieve:

  1. Sent a request to /_bulk?filter_path=took,errors
  2. call inside BulkProcessor.Listener a BulkResponse.hasFailures()

Java's `ArrayList.toArray()` returns provided array when collection is empty.

Here is created a one-element array which contains null element.

Thus, returned `BulkResponse` may contains a null element as `BulkItemResponse`.

How to achieve:
1. Sent a request to `/_bulk?filter_path=took,errors`
2. call inside `BulkProcessor.Listener` a `BulkResponse.hasFailures()`
@cla-checker-service
Copy link

cla-checker-service bot commented Jul 6, 2022

💚 CLA has been signed

@elasticsearchmachine elasticsearchmachine added v8.4.0 external-contributor Pull request authored by a developer outside the Elasticsearch team labels Jul 6, 2022
@catap catap closed this Jul 7, 2022
@catap
Copy link
Contributor Author

catap commented Jul 7, 2022

Reopened as #88358

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor Pull request authored by a developer outside the Elasticsearch team v8.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants