提交 e18df1ff 编写于 作者: M Mark Waite 提交者: Oleg Nenashev

[JENKINS-52153] - Check SlaveComputer.getChannelToMaster() before use (#3488)

[JENKINS-52153] - Check SlaveComputer.getChannelToMaster() before use
上级 92eff988
...@@ -396,7 +396,10 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree, ...@@ -396,7 +396,10 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
// Check for the existance of vetoers if I don't know already // Check for the existance of vetoers if I don't know already
if (vetoersExist == null) { if (vetoersExist == null) {
try { try {
vetoersExist = SlaveComputer.getChannelToMaster().call(new DoVetoersExist()); VirtualChannel channelToMaster = SlaveComputer.getChannelToMaster();
if (channelToMaster != null) {
vetoersExist = channelToMaster.call(new DoVetoersExist());
}
} }
catch (Exception e) { catch (Exception e) {
LOGGER.log(Level.WARNING, "Error while determining if vetoers exist", e); LOGGER.log(Level.WARNING, "Error while determining if vetoers exist", e);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册