Commit 6174e0f
committed
Fixed NullPointerException on bulk request
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()`1 parent 5fb143d commit 6174e0f
File tree
2 files changed
+6
-1
lines changed- docs/changelog
- server/src/main/java/org/elasticsearch/action/bulk
2 files changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
0 commit comments