title: Jenkins getDescriptor() returns NullPointerException
body: <p>My descriptor populates two lists, i am trying to call the descriptor with the following:</p>
  
  <p><code>ZAPDriverDescriptorImpl zapDriver = getDescriptor();</code></p>
  
  <p>then i call</p>
  
  <p><code>zapDriver.getAllFormats()</code> and <code>zapDriver.getAllExportFormats())</code> to obtain the two lists. I concatenate them into list with only the unique elements.</p>
  
  <p>Full class can be found <a href="https://github.com/JordanGS/zaproxy-plugin/blob/development/src/main/java/com/github/jenkinsci/zaproxyplugin/ZAPDriver.java#L815" rel="nofollow noreferrer">on GitHub</a></p>
  
  <p>The problem is that this works when i'm running jenkins locally (only on the master) but when i do a <code>master-slave</code>, this code would execute on the slave and run into a <code>NullPointerException</code></p>
  
  <pre><code>ERROR: java.lang.NullPointerException
      at hudson.model.AbstractDescribableImpl.getDescriptor(AbstractDescribableImpl.java:41)
      at com.github.jenkinsci.zaproxyplugin.ZAPDriver.getDescriptor(ZAPDriver.java:2435)
      at com.github.jenkinsci.zaproxyplugin.ZAPDriver.deleteReports(ZAPDriver.java:815)
      at com.github.jenkinsci.zaproxyplugin.ZAPDriver.executeZAP(ZAPDriver.java:1141)
      at com.github.jenkinsci.zaproxyplugin.ZAPBuilder$ZAPDriverCallable.invoke(ZAPBuilder.java:362)
      at com.github.jenkinsci.zaproxyplugin.ZAPBuilder$ZAPDriverCallable.invoke(ZAPBuilder.java:1)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2720)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at hudson.remoting.Engine$1$1.run(Engine.java:69)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>