If you have a Java object array (as opposed to a list, as with typical Groovy code) and try to pass it as an argument to a CPS-transformed method, only the first element arrives, rather than an array.
Workarounds:
- wrap the array in Arrays.asList before passing it, and treat the argument as a List
- annotate the method as @NonCPS (assuming it is not calling any steps)
- is duplicated by
-
JENKINS-29990 NPE from CpsCallableInvocation.<init> when passing null to one-arg method
- Resolved
-
JENKINS-32122 A List passed to a function is received as a String
- Resolved
- links to