-
Bug
-
Resolution: Unresolved
-
Major
-
None
Executing the following code as pipeline script (in a global library or after allowing Eval.x in the Sandbox):
class Test { String testeval() { return Eval.x(this, '"${x.a()}-${x.b()}-${x.c()}"') } String a() { return "a" } String b() { return "b" } String c() { return "c" } } echo new Test().testeval()
prints only "a" instead of the expected "a-b-c"
I also found that
does the same thing and
results in a CpsCallableInvocation due to
JENKINS-26313. This is fixable by annotating a() b() and c() with @NonCPS (and will return a-b-c then), but that really limits the usability.