Skip to content
Permalink
Browse files

[JENKINS-48090] Naming

  • Loading branch information...
stephenc committed Dec 4, 2017
1 parent 0fa2972 commit 68baf702f9e5f88a2cf32179feb1b759aa2474a3
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/main/java/jenkins/branch/MultiBranchProject.java
@@ -647,7 +647,7 @@ protected void computeChildren(final ChildObserver<P> observer, final TaskListen
}

private void scheduleBuild(BranchProjectFactory<P, R> factory, final P item, SCMRevision revision,
TaskListener listener, String name, Cause[] cause, Action... actions) {
TaskListener listener, String name, Cause[] causes, Action... actions) {
if (!isBuildable()) {
listener.getLogger().printf("Did not schedule build for branch: %s (%s is disabled)%n",
name, getDisplayName());
@@ -665,22 +665,22 @@ private void scheduleBuild(BranchProjectFactory<P, R> factory, final P item, SCM
if (causeCount == 0) {
// no existing causes, insert new one at start
_actions = new Action[actions.length + 1];
_actions[0] = new CauseAction(cause);
_actions[0] = new CauseAction(causes);
System.arraycopy(actions, 0, _actions, 1, actions.length);
} else {
// existing causes, filter out and insert aggregate at start
_actions = new Action[actions.length + 1 - causeCount];
int i = 1;
List<Cause> causeList = new ArrayList<>();
Collections.addAll(causeList, cause);
List<Cause> _causes = new ArrayList<>();
Collections.addAll(_causes, causes);
for (Action a: actions) {
if (a instanceof CauseAction) {
causeList.addAll(((CauseAction) a).getCauses());
_causes.addAll(((CauseAction) a).getCauses());
} else {
_actions[i++] = a;
}
}
_actions[0] = new CauseAction(causeList);
_actions[0] = new CauseAction(_causes);
}
if (ParameterizedJobMixIn.scheduleBuild2(item, 0, _actions) != null) {
listener.getLogger().println("Scheduled build for branch: " + name);

0 comments on commit 68baf70

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