artembilan/spring-integration — comment on commit 48993a50a44d85edc299eedf431a8bd6f63d3b63
File: spring-integration-groovy/src/main/java/org/springframework/integration/groovy/VariableBindingGroovyObjectCustomizerDecorator.java line 53
By artembilan:

It's not dangerous. If you look into https://github.com/dsyer/spring-framework/blob/91877ff97f0a039e3104ff6c18e875d490c7e76e/spring-context/src/main/java/org/springframework/scripting/groovy/.java#L238
you see:
1. that on the background it calls groovy.lang.Script default constructor and:

Script.class.isAssignableFrom(scriptClass)

2. So, Script.binding is default clear instance.
3. And on the other hand in SI-Groovy we always use VariableBindingGroovyObjectCustomizerDecorator as groovyObjectCustomizer for call constructor of GroovyScriptFactory
4. Also as you see I try to set binding at first before setting any variables.

I hope I explained