Commit de1f6c2
committed
Handle Null in FetchSourceContext#fetchSource (#36839)
This change ensures that when null is passed as the value to one of
UpdateRequest#fetchSource @nullable parameters, it is not wrapped in a
String array. That would in turn cause a NPE when attempting to serialize
FetchSourceContext as its constructor checks explicitly for Null and not for
arrays of Null objects.
In master, the problematic behavior was corrected as part of #292931 parent 2abb8b5 commit de1f6c2
File tree
2 files changed
+31
-1
lines changed- server/src
- main/java/org/elasticsearch/action/update
- test/java/org/elasticsearch/update
2 files changed
+31
-1
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
406 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
407 | 409 | | |
408 | 410 | | |
409 | 411 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
382 | 410 | | |
383 | 411 | | |
384 | 412 | | |
| |||
0 commit comments