elasticsearch/elasticsearch — pull request #8201 by pickypg (2014-10-22 20:32:50+00:00)
Title: Enable indy (invokedynamic) compile flag for Groovy scripts by default

With Java 7 and the `groovy-all-x.y.z-indy` jar, Groovy scripts can be compiled with `invokedynamic` instruction support. Even with the "indy" jar, Groovy does not enable this by default so that Groovy code compiled with these features are compatible with JVMs prior to Java 7.

With this commit, it is turned on by default because Elasticsearch requires Java 7. However, Java 7's invokedynamic support was buggy until Java 7u60 (and later), which means that users of this should update their JVMs to at least that version.

This does provide an unadvertised property (`"script.groovy.indy"`) to disable the feature in the unlikely event that user's do not want it enabled (e.g., future, non-existent JVM bug). Set it to `false` to disable this feature.