提交 24bfe8ea 编写于 作者: M mindless

r30283 introduced an NPE when tests do createSlave(), as there is no Stapler context

to get the rootUrl.  Add null check here.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30359 71c3de6d-444a-0410-be80-ed276b4c234a
上级 19f702af
......@@ -100,8 +100,10 @@ public class CommandLauncher extends ComputerLauncher {
{// system defined variables
String rootUrl = Hudson.getInstance().getRootUrl();
pb.environment().put("HUDSON_URL", rootUrl);
pb.environment().put("SLAVEJAR_URL", rootUrl+"/jnlpJars/slave.jar");
if (rootUrl != null) {
pb.environment().put("HUDSON_URL", rootUrl);
pb.environment().put("SLAVEJAR_URL", rootUrl+"/jnlpJars/slave.jar");
}
}
if (env != null) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册