Skip to content

Commit

Permalink
[FIXED JENKINS-22879] Fix Groovy classloading issue.
Browse files Browse the repository at this point in the history
Pass a classloader that is aware of BooleanCategory into Groovy
  • Loading branch information
mc1arke authored and Michael Clarke committed May 6, 2014
1 parent 51ac5ab commit 6b58a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/matrix/FilterScript.java
Expand Up @@ -100,7 +100,7 @@ public static FilterScript parse(String expression, FilterScript defaultScript)
if (Util.fixEmptyAndTrim(expression)==null)
return defaultScript;

GroovyShell shell = new GroovyShell();
GroovyShell shell = new GroovyShell(FilterScript.class.getClassLoader());

return new FilterScript(shell.parse("use("+BooleanCategory.class.getName().replace('$','.')+") {"+expression+"}"));
}
Expand Down

0 comments on commit 6b58a34

Please sign in to comment.