mirror of https://github.com/apache/nifi.git
NIFI-6764: Recreate GroovyShell in ExecuteGroovyScript only when necessary
Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com> This closes #3803.
This commit is contained in:
parent
266a59d05a
commit
77e9bda0ff
|
@ -233,7 +233,10 @@ public class ExecuteGroovyScript extends AbstractProcessor {
|
|||
*/
|
||||
@Override
|
||||
public void onPropertyModified(final PropertyDescriptor descriptor, final String oldValue, final String newValue) {
|
||||
this.shell = null;
|
||||
// Only re-create the shell if necessary, this helps if loading native libraries
|
||||
if (ExecuteGroovyScript.ADD_CLASSPATH.equals(descriptor)) {
|
||||
this.shell = null;
|
||||
}
|
||||
this.compiled = null;
|
||||
this.scriptLastModified = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue