title: Scripts not permitted to use staticMethod java.time.Instant parse java.lang.CharSequence
body: <p>In a jenkinsfile using a shared library (configured on a jenkins folder/untrusted) I have the following line:</p>
  
  <pre><code>def itemTime = Instant.parse("2018-02-27T13:33:36Z")
  </code></pre>
  
  <p>When I run my pipeline I get:</p>
  
  <pre><code>org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod java.time.Instant parse java.lang.CharSequence
      at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectStaticMethod(StaticWhitelist.java:189)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onStaticCall(SandboxInterceptor.java:150)
      at org.kohsuke.groovy.sandbox.impl.Checker$2.call(Checker.java:184)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedStaticCall(Checker.java:188)
  </code></pre>
  
  <p>Of course I can manually approve the script method:</p>
  
  <pre><code>staticMethod java.time.Instant parse java.lang.CharSequence
  </code></pre>
  
  <p>on the Jenkins master and I also looked at:</p>
  
  <p><a href="https://stackoverflow.com/questions/38276341/jenkins-ci-pipeline-scripts-not-permitted-to-use-method-groovy-lang-groovyobject">Jenkins CI Pipeline Scripts not permitted to use method groovy.lang.GroovyObject</a></p>
  
  <p>But:</p>
  
  <ol>
  <li>Why is that method <em>blacklisted</em> in the first place?</li>
  <li>How do I parse the above date using only white listed methods?</li>
  </ol>