Skip to content

Commit

Permalink
[JENKINS-28321] Verify that whitelisted method pointers can be used.
Browse files Browse the repository at this point in the history
  • Loading branch information
abayer committed Aug 8, 2017
1 parent 85d0325 commit ee83ee5
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -275,4 +275,17 @@ public void explicitSetter() throws Exception {

jenkins.assertLogContains("a is 10", b);
}

@Issue("JENKINS-28321")
@Test
public void whitelistedMethodPointer() throws Exception {
WorkflowJob job = jenkins.createProject(WorkflowJob.class, "p");
job.setDefinition(new CpsFlowDefinition("def foo = 'original'\n" +
"def bar = foo.&toUpperCase\n" +
"echo bar.call()\n", true));

WorkflowRun b = jenkins.buildAndAssertSuccess(job);

jenkins.assertLogContains("ORIGINAL", b);
}
}

0 comments on commit ee83ee5

Please sign in to comment.