diff --git a/src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java b/src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java index ff97d6d9..cb9b976f 100644 --- a/src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java +++ b/src/main/java/hudson/plugins/throttleconcurrents/ThrottleJobProperty.java @@ -30,6 +30,8 @@ import net.sf.json.JSONObject; +import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang.StringUtils; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.StaplerRequest; @@ -78,7 +80,7 @@ public ThrottleJobProperty(Integer maxConcurrentPerNode, this.paramsToUseForLimit = paramsToUseForLimit; if ((this.paramsToUseForLimit != null)) { if ((this.paramsToUseForLimit.length() > 0)) { - this.paramsToCompare = Arrays.asList(this.paramsToUseForLimit.split(",")); + this.paramsToCompare = Arrays.asList(ArrayUtils.nullToEmpty(StringUtils.split(this.paramsToUseForLimit))); } else { this.paramsToCompare = new ArrayList(); diff --git a/src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java b/src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java index 15a88eea..33c28a14 100644 --- a/src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java +++ b/src/main/java/hudson/plugins/throttleconcurrents/ThrottleQueueTaskDispatcher.java @@ -218,7 +218,7 @@ private boolean isAnotherBuildWithSameParametersRunningOnNode(Node node, Queue.I if (exec.getCurrentExecutable() != null && exec.getCurrentExecutable().getParent() != null && exec.getCurrentExecutable().getParent().getOwnerTask() != null && - exec.getCurrentExecutable().getParent().getOwnerTask().getName().equals(item.task.getDisplayName())) { + exec.getCurrentExecutable().getParent().getOwnerTask().getName().equals(item.task.getName())) { List executingUnitParams = getParametersFromWorkUnit(exec.getCurrentWorkUnit()); executingUnitParams = doFilterParams(paramsToCompare, executingUnitParams);