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

NPE when deleting a job

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • Jenkins 2.32.3, Pipeline Milestone Step plug-in 1.3

      Hi,

       

      When deleting a job programmatically, a non pipeline job, we have a NPE:

       

      Mar 10, 2017 4:23:21 PM hudson.model.listeners.ItemListener forAll
      WARNING: failed to send event to listener of class org.jenkinsci.plugins.pipeline.milestone.MilestoneStepExecution$CleanupJobsOnDelete
      java.lang.NullPointerException
      at org.jenkinsci.plugins.pipeline.milestone.MilestoneStepExecution$CleanupJobsOnDelete.onDeleted(MilestoneStepExecution.java:348)
      at hudson.model.listeners.ItemListener$4.apply(ItemListener.java:205)
      at hudson.model.listeners.ItemListener$4.apply(ItemListener.java:203)
      at hudson.model.listeners.ItemListener.forAll(ItemListener.java:167)
      at hudson.model.listeners.ItemListener.fireOnDeleted(ItemListener.java:203)
      at jenkins.model.Jenkins.onDeleted(Jenkins.java:2918)
      at jenkins.model.Jenkins.onDeleted(Jenkins.java:324)
      at hudson.model.AbstractItem.delete(AbstractItem.java:572)
      at hudson.model.Job.delete(Job.java:683)

       

      The getMilestonesByOrdinalByJob() method might return null and should be checked against this.

       

      Best regards,

      Damien.

            amuniz Antonio Muñiz
            damien_coraboeuf Damien Coraboeuf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: