Commit a952ae3a authored by Anton Tarasov's avatar Anton Tarasov
Browse files

IDEA-194795 Exception appears when try to open file chooser from Welcome screen

Reverted a part of the fix for IDEA-190436.
parent 6cceac3e
Showing with 7 additions and 2 deletions
+7 -2
...@@ -13,6 +13,7 @@ import org.jetbrains.annotations.NotNull; ...@@ -13,6 +13,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import javax.swing.*; import javax.swing.*;
import javax.swing.plaf.BorderUIResource;
import javax.swing.plaf.ColorUIResource; import javax.swing.plaf.ColorUIResource;
import javax.swing.plaf.IconUIResource; import javax.swing.plaf.IconUIResource;
import java.awt.*; import java.awt.*;
...@@ -111,9 +112,13 @@ public class UITheme { ...@@ -111,9 +112,13 @@ public class UITheme {
if (key.endsWith("Insets") || key.endsWith("padding")) { if (key.endsWith("Insets") || key.endsWith("padding")) {
return parseInsets(value); return parseInsets(value);
} else if (key.endsWith("border")) { } else if (key.endsWith("Border") || key.endsWith("border")) {
try { try {
return Class.forName(value).newInstance(); if (StringUtil.split(value, ",").size() == 4) {
return new BorderUIResource.EmptyBorderUIResource(parseInsets(value));
} else {
return Class.forName(value).newInstance();
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment