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

unclassified method java.lang.String replaceAll java.lang.String

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This simple pipeline script:

      def rev="v3.1.7"
      echo "2"
      rev.replaceAll(/v([0-9])\../)

      will result in this exception after printing "2":

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: unclassified method java.lang.String replaceAll java.lang.String
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:113)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149)

      However the sandbox administration area doesn't offer to add this violation to the whitebox.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Probably a duplicate.

            Show
            jglick Jesse Glick added a comment - Probably a duplicate.
            Hide
            jglick Jesse Glick added a comment -

            There is no such method.

            Show
            jglick Jesse Glick added a comment - There is no such method.
            Hide
            dothebart Wilfried Goesgens added a comment -

            Jesse Glick then this is another instance of the sandbox not giving propper error messages. RejectedAccessException is wrong here,

             

            Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.String.replaceAll() is applicable for argument types: (java.lang.String) values: [v([0-9])\..]

            should be thrown then.

             

            Show
            dothebart Wilfried Goesgens added a comment - Jesse Glick then this is another instance of the sandbox not giving propper error messages. RejectedAccessException is wrong here,   Caught: groovy.lang.MissingMethodException: No signature of method: java.lang.String.replaceAll() is applicable for argument types: (java.lang.String) values: [v( [0-9] )\..] should be thrown then.  
            Hide
            jglick Jesse Glick added a comment -

            Right, which is why this is a duplicate of the well-known issue.

            Show
            jglick Jesse Glick added a comment - Right, which is why this is a duplicate of the well-known issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                dothebart Wilfried Goesgens
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: