Simple for-loop throws null_pointer_exception in painless #28501
Labels
>bug
:Core/Infra/Scripting
Scripting abstractions, Painless, and Mustache
v6.0.3
v6.1.4
v6.2.1
v6.3.0
v7.0.0-beta1
Elasticsearch version (
bin/elasticsearch --version
):6.1.0 (build hash:
c0c1ba0
)Plugins installed:
Using official docker image
docker.elastic.co/elasticsearch/elasticsearch:6.1.0
JVM version (
java -version
):Using official docker image
docker.elastic.co/elasticsearch/elasticsearch:6.1.0
OS version (
uname -a
if on a Unix-like system):Docker host machine: OSX 10.11.6
Description of the problem including expected versus actual behavior:
When a painless script contains a for-loop that contains an variable assignment in its first clause, it would cause a compile error and
null_pointer_exception
.I.e. This causes null_pointer_exception:
But this works:
This also works:
Steps to reproduce:
Expected
Successful response with no-op like:
Actual
Status-400 response with "compile error" and "null_pointer_exception":
Possibly relates to #24695
The text was updated successfully, but these errors were encountered: