提交 c5f1ed58 编写于 作者: K kohsuke

Tagging a repository can result in NPE.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29013 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6dfd41e8
......@@ -72,6 +72,9 @@ import static java.lang.Math.abs;
* @since 1.349
*/
public class AnnotatedLargeText<T> extends LargeText {
/**
* Can be null.
*/
private T context;
public AnnotatedLargeText(File file, Charset charset, boolean completed, T context) {
......@@ -130,7 +133,7 @@ public class AnnotatedLargeText<T> extends LargeText {
throw new IOException2(e);
}
// start from scratch
return ConsoleAnnotator.initial(context.getClass());
return ConsoleAnnotator.initial(context==null ? null : context.getClass());
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册