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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Jenkins 2.124

      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]

            Unassigned Unassigned
            zhorvatic Zvonimir Horvatić
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: