提交 16a1cadb 编写于 作者: J jglick

[HUDSON-5097] Better diagnostics.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@24680 71c3de6d-444a-0410-be80-ed276b4c234a
上级 bea7fbda
......@@ -104,12 +104,19 @@ public abstract class ToolInstaller implements Describable<ToolInstaller>, Exten
* @since 1.310
*/
protected final FilePath preferredLocation(ToolInstallation tool, Node node) {
if (node == null) {
throw new IllegalArgumentException("must pass non-null node");
}
String home = Util.fixEmptyAndTrim(tool.getHome());
if (home == null) {
// XXX should this somehow uniquify paths among ToolInstallation.all()?
home = tool.getName().replaceAll("[^A-Za-z0-9_.-]+", "_");
}
return node.getRootPath().child("tools").child(home);
FilePath root = node.getRootPath();
if (root == null) {
throw new IllegalArgumentException("Node " + node.getDisplayName() + " seems to be offline");
}
return root.child("tools").child(home);
}
public ToolInstallerDescriptor<?> getDescriptor() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册