-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins: 2.176.3
Pipeline: Groovy: 2.74
Run this pipeline:
def hello() { echo 'hello' } (this.&hello).call()
The output is as follows:
[Pipeline] Start of Pipeline expected to call org.kohsuke.groovy.sandbox.impl.SandboxedMethodClosure.call but wound up catching WorkflowScript.hello; see: https://jenkins.io/redirect/pipeline-cps-method-mismatches/ [Pipeline] echo hello [Pipeline] End of Pipeline Finished: SUCCESS
As evidenced by the "hello" output, the hello method runs normally, so the warning is a false positive.
- is duplicated by
-
JENKINS-60636 Using method pointers results in warning
-
- Closed
-
We came across the exact same warning when calling a method via a pointer. The method is called correctly and works fine, apparently this is a false positive warning.
Pointers are assigned with https://github.com/openshift/aos-cd-jobs/pull/2053/files#diff-b89f72b7074288d1245c7ece87537d33R13-R19 and called at
https://github.com/openshift/aos-cd-jobs/pull/2053/files#diff-b89f72b7074288d1245c7ece87537d33R111