Skip to content

Commit

Permalink
[JENKINS-46191] Verify fix from groovy-sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
abayer committed Aug 16, 2017
1 parent 2cc6126 commit 58e309f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>org.kohsuke</groupId>
<artifactId>groovy-sandbox</artifactId>
<version>1.14</version>
<version>1.15-20170816.182125-1</version> <!-- TODO: Switch to release once https://github.com/jenkinsci/groovy-sandbox/pull/39 is merged/released -->
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
Expand Down
Expand Up @@ -859,4 +859,10 @@ public void rhsOfDeclarationTransformed() throws Exception {
assertRejected(new StaticWhitelist(), "staticMethod jenkins.model.Jenkins getInstance", "jenkins.model.Jenkins x = jenkins.model.Jenkins.getInstance()");
}

@Issue("JENKINS-46191")
@Test
public void emptyDeclaration() throws Exception {
assertEvaluate(new GenericWhitelist(), "abc", "String a; a = 'abc'; return a");
}

}

0 comments on commit 58e309f

Please sign in to comment.