Skip to content

Commit

Permalink
[JENKINS-47508] Fix NPE when executionId is missing (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrille Le Clerc committed Oct 23, 2017
1 parent 291aa5b commit 0ecfd86
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -96,7 +96,10 @@ public boolean _handle(@Nonnull ExecutionEvent executionEvent) {
plugin.setAttribute("artifactId", execution.getArtifactId());
plugin.setAttribute("goal", execution.getGoal());
plugin.setAttribute("version", execution.getVersion());
plugin.setAttribute("executionId", execution.getExecutionId());
if (execution.getExecutionId() != null) {
// See JENKINS-47508, caused by plugin being declared and invoked by the <reports> section
plugin.setAttribute("executionId", execution.getExecutionId());
}
if (execution.getLifecyclePhase() != null) {
// protect against null lifecyclePhase. cause is NOT clear
plugin.setAttribute("lifecyclePhase", execution.getLifecyclePhase());
Expand Down

0 comments on commit 0ecfd86

Please sign in to comment.