From de98984fa904a1a884258fe44e6eb21ff2159c1c Mon Sep 17 00:00:00 2001 From: Eugene Kudelevsky Date: Fri, 8 Apr 2011 23:18:04 +0400 Subject: [PATCH] fix NumberFormatException --- .../src/com/intellij/xml/util/ColorSampleLookupValue.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xml/impl/src/com/intellij/xml/util/ColorSampleLookupValue.java b/xml/impl/src/com/intellij/xml/util/ColorSampleLookupValue.java index da36441b16f8..d10d90ca45fb 100644 --- a/xml/impl/src/com/intellij/xml/util/ColorSampleLookupValue.java +++ b/xml/impl/src/com/intellij/xml/util/ColorSampleLookupValue.java @@ -289,7 +289,12 @@ public class ColorSampleLookupValue implements LookupValueWithUIHint, DeferredUs public Icon getIcon(int flags) { if (myColor == null) { if (myValue.startsWith("#")) { - myColor = Color.decode("0x" + myValue.substring(1)); + try { + myColor = Color.decode("0x" + myValue.substring(1)); + } + catch (NumberFormatException e) { + return null; + } } }