title: Jenkins pipeline groovy odd behavior
body: <p>I have a groovy pipeline script:</p>
  
  <pre><code>stage("Test") {
      str="[\"asd1\", \"asd2\"]"
      def tagNames = str.tokenize(',[]').collect { it as String }
      echo "${tagNames.getClass()}"
      echo "${tagNames.size}"
  }
  </code></pre>
  
  <p>But on the output I see error "No such field found: field java.lang.String size":</p>
  
  <pre><code>[Pipeline] stage
  [Pipeline] { (Test)
  [Pipeline] echo
  class java.util.ArrayList
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // node
  No such field found: field java.lang.String size. Administrators can decide whether to approve or reject this signature.
  [Pipeline] End of Pipeline
  </code></pre>
  
  <p>What I'm doing wrong?</p>
  
  <p>Edit: I have "No pending signature approvals."</p>