title: org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: No such field found: field java.lang.String
body: <p>Jenkins declarative pipeline script where I've a 2 pipelines, pipeline a triggers downstream job pipeline b.
  In pipeline a, there's a user input params.userInput and it can be specified or left out.
  If it's left out then in the downstream job, I check the parameter as follows:</p>
  <pre><code>def myInput = &quot;&quot;
  def myOutput = &quot;d, e, f&quot;
  if(!params.userInput){ // userInput doesn't exist check, not empty rather isn't specified so set a default
   myInput = &quot;a, b, c&quot;
   myInput += &quot;, &quot; + myOutPut // myInput = &quot;a, b, c, d, e, f&quot;
  }
  else{ // userInput is specified so use it
   myInput = params.userInput
  }
  </code></pre>
  <p>I'm getting following exception:</p>
  <pre><code>org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: No such field found: field java.lang.String xyz
  23:13:49    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.unclassifiedField(SandboxInterceptor.java:425)
  23:13:49    at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onSetProperty(SandboxInterceptor.java:263)
  23:13:49    at org.kohsuke.groovy.sandbox.impl.Checker$8.call(Checker.java:409)
  23:13:49    at org.kohsuke.groovy.sandbox.impl.Checker.checkedSetProperty(Checker.java:416)
  23:13:49    at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.setProperty(SandboxInvoker.java:33)
  23:13:49    at com.cloudbees.groovy.cps.impl.PropertyAccessBlock.rawSet(PropertyAccessBlock.java:24)
  23:13:49    at WorkflowScript.myOutPut(WorkflowScript:381)
  23:13:49    at WorkflowScript.processUserInputs(WorkflowScript:186)
  23:13:49    at WorkflowScript.run(WorkflowScript:103)
  23:13:49    at ___cps.transform___(Native Method)
  23:13:49    at com.cloudbees.groovy.cps.impl.PropertyishBlock$ContinuationImpl.set(PropertyishBlock.java:88)
  23:13:49    at com.cloudbees.groovy.cps.impl.AssignmentBlock$ContinuationImpl.assignAndDone(AssignmentBlock.java:70)
  23:13:49    at sun.reflect.GeneratedMethodAccessor366.invoke(Unknown Source)
  23:13:49    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  23:13:49    at java.lang.reflect.Method.invoke(Method.java:498)
  23:13:49    at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
  23:13:49    at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
  23:13:49    at com.cloudbees.groovy.cps.Next.step(Next.java:83)
  23:13:49    at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
  23:13:49    at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
  23:13:49    at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129)
  23:13:49    at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268)
  23:13:49    at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:185)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:400)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:96)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:312)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:276)
  23:13:49    at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
  23:13:49    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  23:13:49    at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:136)
  23:13:49    at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
  23:13:49    at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59)
  23:13:49    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  23:13:49    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  23:13:49    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  23:13:49    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  23:13:49    at java.lang.Thread.run(Thread.java:748)
  23:13:49  Finished: FAILURE
  </code></pre>
  <p>Use Groovy Sandbox is checked and I don't have permission to change configuration to disable sandbox and approve the script to test it out.</p>
  <p>With sandbox enabled, how can I resolve the exception?</p>