Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-50305

sandbox should handle normal Groovy coercions

      I have a custom pipeline step whose signature is (boolean, String, List<String>), and I'm trying to use a chained call.

      Due to a bug in CPS, it's trying to pass Integer, GStringImpl, ArrayList, but in the event of the actual Groovy call this should succeed--anything can be run through `asBoolean()`, and GStrings are transparently coerced to regular strings.

      I'm not sure how challenging supporting this correctly would be, but these coercions (particularly GStrings) shouldn't trigger the sandbox.

          [JENKINS-50305] sandbox should handle normal Groovy coercions

          Andrew Bayer added a comment -

          I could have sworn I'd actually dealt with this somewhere, but I guess there was more involved. For the moment, you can get around this by using CharSequence in the method signature rather than String - GStringImpl implements CharSequence, so that'll work.

          Andrew Bayer added a comment - I could have sworn I'd actually dealt with this somewhere, but I guess there was more involved. For the moment, you can get around this by using CharSequence in the method signature rather than String - GStringImpl implements CharSequence , so that'll work.

            Unassigned Unassigned
            chrylis Christopher Smith
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: