diff --git a/core/src/main/java/hudson/console/AnnotatedLargeText.java b/core/src/main/java/hudson/console/AnnotatedLargeText.java index a928783720b0f1c01dc8671fea83aeb0c247f654..3fc00e4211fd042c4a2464b2f840d5e66f8b79ea 100644 --- a/core/src/main/java/hudson/console/AnnotatedLargeText.java +++ b/core/src/main/java/hudson/console/AnnotatedLargeText.java @@ -72,6 +72,9 @@ import static java.lang.Math.abs; * @since 1.349 */ public class AnnotatedLargeText 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 extends LargeText { throw new IOException2(e); } // start from scratch - return ConsoleAnnotator.initial(context.getClass()); + return ConsoleAnnotator.initial(context==null ? null : context.getClass()); } @Override