提交 84a01cd2 编写于 作者: J Jesse Glick

@CheckForNull

上级 5155120d
......@@ -371,7 +371,7 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable
* null if this node is not connected hence the path is not available
*/
// TODO: should this be modified now that getWorkspace is moved from AbstractProject to AbstractBuild?
public abstract FilePath getWorkspaceFor(TopLevelItem item);
public abstract @CheckForNull FilePath getWorkspaceFor(TopLevelItem item);
/**
* Gets the root directory of this node.
......@@ -384,7 +384,7 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable
* null if the node is offline and hence the {@link FilePath}
* object is not available.
*/
public abstract FilePath getRootPath();
public abstract @CheckForNull FilePath getRootPath();
/**
* Gets the {@link FilePath} on this node.
......
......@@ -57,6 +57,7 @@ import java.util.Set;
import javax.servlet.ServletException;
import hudson.util.TimeUnit2;
import javax.annotation.CheckForNull;
import jenkins.model.Jenkins;
import jenkins.slaves.WorkspaceLocator;
......@@ -284,7 +285,7 @@ public abstract class Slave extends Node implements Serializable {
* @return
* null if not connected.
*/
public FilePath getWorkspaceRoot() {
public @CheckForNull FilePath getWorkspaceRoot() {
FilePath r = getRootPath();
if(r==null) return null;
return r.child(WORKSPACE_ROOT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册