Skip to content

Commit

Permalink
Picking up script-security 1.30 release, and demonstrating fix of JEN…
Browse files Browse the repository at this point in the history
…KINS-45629.
  • Loading branch information
jglick committed Jul 25, 2017
1 parent f9ddb92 commit 9751df6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -93,7 +93,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.30-20170713.204356-2</version> <!-- TODO https://github.com/jenkinsci/script-security-plugin/pull/132 -->
<version>1.30</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Expand Up @@ -77,11 +77,13 @@ public class CpsFlowDefinition2Test extends AbstractCpsFlowTest {
jenkins.configRoundtrip(job);
}

@Issue("JENKINS-34599")
@Test public void finalFields() throws Exception {
@Issue({"JENKINS-34599", "JENKINS-45629"})
@Test public void fieldInitializers() throws Exception {
WorkflowJob p = jenkins.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition("class X {final String val; X(String _val) {val = _val}}; echo(/hello ${new X('world').val}/)", true));
jenkins.assertLogContains("hello world", jenkins.buildAndAssertSuccess(p));
p.setDefinition(new CpsFlowDefinition("class X {String world = 'world'; String message = 'hello ' + world}; echo(new X().message)", true));
jenkins.assertLogContains("hello world", jenkins.buildAndAssertSuccess(p));
}

@Test
Expand Down

0 comments on commit 9751df6

Please sign in to comment.