提交 d63b7025 编写于 作者: K kohsuke

made just a little bit more efficient. Did this fix issue #1564?

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8770 71c3de6d-444a-0410-be80-ed276b4c234a
上级 7ea21ac4
......@@ -742,6 +742,10 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node,
return r;
}
/*package*/ Computer getComputer(Node n) {
return computers.get(n);
}
public Computer getComputer(String name) {
if(name.equals("(master)"))
name = "";
......@@ -762,7 +766,7 @@ public final class Hudson extends View implements ItemGroup<TopLevelItem>, Node,
}
public Computer toComputer() {
return getComputer("");
return getComputer(this);
}
/**
......
......@@ -559,7 +559,7 @@ public final class Slave implements Node, Serializable {
* Gets the corresponding computer object.
*/
public ComputerImpl getComputer() {
return (ComputerImpl)Hudson.getInstance().getComputer(getNodeName());
return (ComputerImpl)Hudson.getInstance().getComputer(this);
}
public Computer toComputer() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册