Skip to content
Permalink
Browse files

JENKINS-33293: fix NPE on labels in Updater.submitComments()

Duplicated by JENKINS-33551
  • Loading branch information
jcarsique committed Mar 15, 2016
1 parent 8703637 commit b6ba033b5ee3ee6cfe8362573f16891b2e9d4465
Showing with 5 additions and 15 deletions.
  1. +5 −15 src/main/java/hudson/plugins/jira/Updater.java
@@ -4,40 +4,26 @@

import java.io.IOException;
import java.io.PrintStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URL;
import java.rmi.RemoteException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.lang.StringUtils;
import com.atlassian.jira.rest.client.api.RestClientException;
import com.google.common.base.Strings;
import com.google.common.collect.Maps;

import hudson.Util;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.Hudson;
import hudson.model.ParameterValue;
import hudson.model.ParametersAction;
import hudson.model.Result;
import hudson.model.Run;
import hudson.model.TaskListener;
import hudson.model.AbstractBuild.DependencyChange;
import hudson.plugins.jira.listissuesparameter.JiraIssueParameterValue;
import hudson.plugins.jira.selector.AbstractIssueSelector;
import hudson.scm.ChangeLogSet;
import hudson.scm.RepositoryBrowser;
@@ -69,7 +55,11 @@ public Updater(SCM scm) {
public Updater(SCM scm, List<String> labels) {
super();
this.scm = scm;
this.labels = labels;
if (labels == null) {
this.labels = new ArrayList<String>();
} else {
this.labels = labels;
}
}

boolean perform(Run<?, ?> build, TaskListener listener, AbstractIssueSelector selector) {

0 comments on commit b6ba033

Please sign in to comment.
You can’t perform that action at this time.