Skip to content

Commit

Permalink
Merge pull request #86 from batmat/JENKINS-49170
Browse files Browse the repository at this point in the history
[JENKINS-49170] NPE can be thrown on null triggers list
  • Loading branch information
svanoort committed Jan 29, 2018
2 parents 5edc739 + 9906156 commit 023a065
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -70,6 +70,15 @@ public PipelineTriggersJobProperty(List<Trigger> triggers) {
}
}

@SuppressWarnings("unused") // called by deserialization
protected Object readResolve() {
if (triggers == null) {
LOGGER.log(Level.WARNING, "triggers attribute was null, this shouldn't happen.");
this.triggers = new ArrayList<>();
}
return this;
}

public void setTriggers(List<Trigger<?>> triggers) {
this.triggers = new ArrayList<>(triggers);
}
Expand Down

0 comments on commit 023a065

Please sign in to comment.