提交 bcce4215 编写于 作者: K Kohsuke Kawaguchi

Fixed NPE with @WithoutJenkins

上级 2ffece9d
......@@ -381,8 +381,10 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
@Override
protected void tearDown() throws Exception {
try {
for (EndOfTestListener tl : jenkins.getExtensionList(EndOfTestListener.class))
tl.onTearDown();
if (jenkins!=null) {
for (EndOfTestListener tl : jenkins.getExtensionList(EndOfTestListener.class))
tl.onTearDown();
}
if (timeoutTimer!=null) {
timeoutTimer.cancel();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册