提交 a85d9791 编写于 作者: K kohsuke

Merged revisions 20672-20673 via svnmerge from

https://www.dev.java.net/svn/hudson/branches/rc

........
  r20672 | kohsuke | 2009-08-13 10:21:23 -0700 (Thu, 13 Aug 2009) | 1 line
  
  I noticed that a swarm slave disconnection while a build is in progress seems to cause an NPE
........
  r20673 | kohsuke | 2009-08-13 10:28:57 -0700 (Thu, 13 Aug 2009) | 1 line
  
  Typo.
........


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@20675 71c3de6d-444a-0410-be80-ed276b4c234a
上级 9c92e885
......@@ -23,7 +23,6 @@
*/
package hudson.model;
import hudson.FilePath;
import hudson.slaves.WorkspaceList;
import hudson.slaves.WorkspaceList.Lease;
......@@ -53,7 +52,7 @@ public class FreeStyleBuild extends Build<FreeStyleProject,FreeStyleBuild> {
String customWorkspace = getProject().getCustomWorkspace();
if (customWorkspace != null)
// we allow custom workspaces to be concurrently used between jobs.
return Lease.creadDummyLease(n.createPath(customWorkspace));
return Lease.createDummyLease(n.createPath(customWorkspace));
return super.decideWorkspace(n,wsl);
}
}
......
......@@ -212,7 +212,7 @@ public class SlaveComputer extends Computer {
if (launcher instanceof ExecutorListener) {
((ExecutorListener)launcher).taskCompleted(executor, task, durationMS);
}
RetentionStrategy r = getNode().getRetentionStrategy();
RetentionStrategy r = getRetentionStrategy();
if (r instanceof ExecutorListener) {
((ExecutorListener) r).taskCompleted(executor, task, durationMS);
}
......@@ -227,9 +227,9 @@ public class SlaveComputer extends Computer {
if (launcher instanceof ExecutorListener) {
((ExecutorListener)launcher).taskCompletedWithProblems(executor, task, durationMS, problems);
}
if (getNode().getRetentionStrategy() instanceof ExecutorListener) {
((ExecutorListener)getNode().getRetentionStrategy()).taskCompletedWithProblems(executor, task, durationMS,
problems);
RetentionStrategy r = getRetentionStrategy();
if (r instanceof ExecutorListener) {
((ExecutorListener) r).taskCompletedWithProblems(executor, task, durationMS, problems);
}
}
......@@ -419,7 +419,8 @@ public class SlaveComputer extends Computer {
}
public RetentionStrategy getRetentionStrategy() {
return getNode().getRetentionStrategy();
Slave n = getNode();
return n==null ? null : n.getRetentionStrategy();
}
/**
......
......@@ -103,7 +103,7 @@ public final class WorkspaceList {
/**
* Creates a dummy {@link Lease} object that does no-op in the release.
*/
public static Lease creadDummyLease(FilePath p) {
public static Lease createDummyLease(FilePath p) {
return new Lease(p) {
public void release() {
// noop
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册