Skip to content
Permalink
Browse files

[JENKINS-42511] Make sure we do not attempt to create the same branch…

… project twice.
  • Loading branch information
jglick committed Mar 7, 2017
1 parent 7184165 commit 61a48b16f22690256701354e661675e56b8d4b38
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/jenkins/branch/MultiBranchProject.java
@@ -2043,8 +2043,11 @@ public void observe(@NonNull SCMHead head, @NonNull SCMRevision revision) {
return;
}
try (ChildNameGenerator.Trace trace = ChildNameGenerator.beforeCreateItem(
MultiBranchProject.this, branch.getEncodedName(), branch.getName()
MultiBranchProject.this, encodedName, branch.getName()
)){
if (getItem(encodedName) != null) {
throw new IllegalStateException("JENKINS-42511: attempted to redundantly create " + encodedName + " in " + this);
}
project = _factory.newInstance(branch);
}
if (!project.getName().equals(encodedName)) {

0 comments on commit 61a48b1

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