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

hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: [LStatus;.getAt() is applicable for argument types: (java.lang.Integer)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 2.124
    • Similar Issues:

      Description

      Using shared library steps (vars folder script), in not a call method, when trying to call .next() on a enum Status{}, an exception is thrown:

      hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: [LStatus;.getAt() is applicable for argument types: (java.lang.Integer) values: [1] Possible solutions: getAt(java.lang.Integer), getAt(groovy.lang.Range), getAt(groovy.lang.EmptyRange), getAt(groovy.lang.ObjectRange), getAt(groovy.lang.IntRange), getAt(java.util.Collection) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:131)

       

       

      Steps to reproduce:

      1. Create shared library step 
      2. declare enum Status with some states
      3. define method checkState(){}
      4. print Status.next() inside the method checkState(){}

       

      Basically, equivalent of this piece of code that runs normally on https://groovyconsole.appspot.com/ :

      enum Status{
          open, indev, developed, deploydev, verified, deploystage, resolved
      }
      def taskStatus='developed'
      print Status."${taskStatus}".next()
      RESULT: 
      [deploydev]

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              zhorvatic Zvonimir Horvatić
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: