mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fix NumberFormatException
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user