diff --git a/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java b/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java index 0994431d375b..bca230cc6985 100644 --- a/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java +++ b/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java @@ -297,9 +297,10 @@ public class ExpectedHighlightingData { TextAttributes forcedAttributes = null; if (foregroundColor != null) { - @JdkConstants.FontStyle int ft = Integer.parseInt(fontType); + @JdkConstants.FontStyle int ft = fontType != null ? Integer.parseInt(fontType) : 0; forcedAttributes = new TextAttributes( - Color.decode(foregroundColor), Color.decode(backgroundColor), Color.decode(effectColor), EffectType.valueOf(effectType), ft); + Color.decode(foregroundColor), backgroundColor != null ? Color.decode(backgroundColor) : null, effectColor != null ? Color.decode(effectColor) : null, + effectType != null ? EffectType.valueOf(effectType) : null, ft); } int rangeStart = textOffset.get();