build numbers of MatrixConfiguration and MatrixProject are linked.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3541 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-06-24 05:38:14 +00:00
1 parent 5fbfa1479a
commit b021350e1b
1 file changed
+5 -1
@@ -50,7 +50,11 @@ public class MatrixConfiguration extends Project<MatrixConfiguration,MatrixRun>
}
public int assignBuildNumber() throws IOException {
return getNextBuildNumber();
int nb = getNextBuildNumber();
MatrixRun r = getLastBuild();
if(r!=null && r.getNumber()>=nb) // make sure we don't schedule the same build twice
throw new IllegalStateException("Build #"+nb+" is already completed");
return nb;
}
public MatrixProject getParent() {