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

whitelist java.util.concurrent.atomic.AtomicInteger in pipelines

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • groovy-plugin
    • None

      Please whitelist java.util.concurrent.atomic.AtomicInteger, currently this must be approved explicitly otherwise a

      def cnt = new java.util.concurrent.atomic.AtomicInteger(42)
      

      results in

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use new java.util.concurrent.atomic.AtomicInteger int
      

      Rationale for using this is ensuring there are no concurrency issues when using parallel pipeline stages. The curent implementation of the Jenkins pipeline may not have concurrency issues, but that could change in the future and parallel code should be written in a proper way no to make assumptions

            vjuranek vjuranek
            axelh Axel Heider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: