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

Unclassified error on Date.parse(String, String) from DefaultGroovyStaticMethods

XMLWordPrintable

      If I create a workflow script and run it in the Groovy Sandbox, with this line:
      now = new Date().format("yyyyMMdd")

      I get this error:
      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.util.Date format java.lang.String

      And I do not get any option to approve it for use in the Script Approval UI. If I don't use the sandbox, the script works OK.

            Unassigned Unassigned
            owenmehegan Owen Mehegan
            Votes:
            12 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved: