Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55594

NPE on not matching targets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • influxdb-plugin
    • None
    • 1.20.3

      If no matching target is found in the target list, the plugin exits with a NPE.If no matching target is found in the target list, the plugin exits with a NPE.

      java.lang.NullPointerException
      	at jenkinsci.plugins.influxdb.InfluxDbPublisher.resolveTimestampForPointGenerationInNanoseconds(InfluxDbPublisher.java:363)
      	at jenkinsci.plugins.influxdb.InfluxDbPublisher.perform(InfluxDbPublisher.java:315)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:51)
      	at hudson.security.ACL.impersonate(ACL.java:290)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:48)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)

      Fix & test provided in https://github.com/jenkinsci/influxdb-plugin/pull/53 

       

      Pipeline to test:

      node{
       step([
         $class: 'InfluxDbPublisher',
         selectedTarget: 'anything',
         customPrefix: null,
         customData: null,
         customDataMap: [jenkins_custom_data: ['anything': 'test']]
       ]) 
      }

            aleksisimell Aleksi Simell
            ennef Christopher Fenner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: