diff --git a/source/com/intellij/codeInsight/daemon/impl/AnnotationHolderImpl.java b/source/com/intellij/codeInsight/daemon/impl/AnnotationHolderImpl.java index 9f6def68bd4b..58f670dfc5c2 100644 --- a/source/com/intellij/codeInsight/daemon/impl/AnnotationHolderImpl.java +++ b/source/com/intellij/codeInsight/daemon/impl/AnnotationHolderImpl.java @@ -54,7 +54,8 @@ public class AnnotationHolderImpl extends SmartList implements Annot } private final Annotation createAnnotation(TextRange range, HighlightSeverity severity, String message) { - Annotation annotation = new Annotation(range.getStartOffset(), range.getEndOffset(), severity, message, "" + XmlUtil.escapeString(message) + ""); + final String tooltip = message == null ? null : "" + XmlUtil.escapeString(message) + ""; + Annotation annotation = new Annotation(range.getStartOffset(), range.getEndOffset(), severity, message, tooltip); add(annotation); return annotation; }