-
Bug
-
Resolution: Not A Defect
-
Major
The following shared library class:
package org.test; class X implements Serializable { String toString() { "X" } }
used in a Jenkinsfile like:
def x = new org.test.X() echo "${x}"
will not result in any output. The output wont even show the echo step.
However
def x = new org.test.X() echo "${x.toString()}"
will work as expected
- relates to
-
JENKINS-45982 Calling super to CPS-transformed methods fails with CpsCallableInvocation
-
- Resolved
-
- links to
Smells similar to
JENKINS-45982- it's another problem where we're getting a CpsCallableInvocation where we probably shouldn't. Specifically here it's the coercion to a String (presumably via the CPS-transformed toString method) that is for some reason throwing a CpsCallableInvocation. My guess is that it's somehow ending up going through a non-CPS transformed context...