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

take() method of strings unavailable

XMLWordPrintable

      Creating a pipeline script with this:

      abc="1234567890"
      abc.take(5)

      will result in:

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods take java.lang.CharSequence int
      at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectStaticMethod(StaticWhitelist.java:190)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:95)

            dothebart Wilfried Goesgens
            dothebart Wilfried Goesgens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: