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

Script Security translates some groovy functions incorrectly/not as expected

    XMLWordPrintable

Details

    • Pipeline - July/August

    Description

      I have a custom class which I am using inside of some groovy functions with a list of custom methods. When I use that custom class inside of a script needed to be approved by script security it is being transformed differently than expected.

       

      When I try to do a for loop through an array and do `i++` it is being translated as i.next() instead of adding 1 and then when I am calling the creator method `def $ITEM` it is being created as a hashmap. Neither of those methods exists inside of my custom class so it is throwing errors like `No signature of method X.next()` and `unclassified new X java.util.LinkedHashMap`

       

      I would either like to get more visibility about hot the translation is happening or potentially have other default method calls.

       

      Let me know if I can provide more context here.

      Attachments

        Issue Links

          Activity

            People

              abayer Andrew Bayer
              ataylor Alex Taylor
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: