提交 f63d3430 编写于 作者: A aHenryJard

Merge remote-tracking branch 'upstream/master' into bom

...@@ -553,8 +553,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A ...@@ -553,8 +553,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @return null if no such build exists. * @return null if no such build exists.
*/ */
public final R getSomeBuildWithWorkspace() { public final R getSomeBuildWithWorkspace() {
int cnt=0; for (R b = getLastBuild(); b != null; b = b.getPreviousBuild()) {
for (R b = getLastBuild(); cnt<5 && b!=null; b=b.getPreviousBuild()) {
FilePath ws = b.getWorkspace(); FilePath ws = b.getWorkspace();
if (ws!=null) return b; if (ws!=null) return b;
} }
...@@ -562,8 +561,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A ...@@ -562,8 +561,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
} }
private R getSomeBuildWithExistingWorkspace() throws IOException, InterruptedException { private R getSomeBuildWithExistingWorkspace() throws IOException, InterruptedException {
int cnt=0; for (R b = getLastBuild(); b != null; b = b.getPreviousBuild()) {
for (R b = getLastBuild(); cnt<5 && b!=null; b=b.getPreviousBuild()) {
FilePath ws = b.getWorkspace(); FilePath ws = b.getWorkspace();
if (ws!=null && ws.exists()) return b; if (ws!=null && ws.exists()) return b;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册