From eee72064bc2f496ba7a08a337031d50e61dbf216 Mon Sep 17 00:00:00 2001 From: speedy Date: Sun, 1 Oct 2017 12:20:16 -0500 Subject: [PATCH] Spark-2017 --- .../jivesoftware/spark/util/GraphicUtils.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/core/src/main/java/org/jivesoftware/spark/util/GraphicUtils.java b/core/src/main/java/org/jivesoftware/spark/util/GraphicUtils.java index bd797412a..693d44f33 100644 --- a/core/src/main/java/org/jivesoftware/spark/util/GraphicUtils.java +++ b/core/src/main/java/org/jivesoftware/spark/util/GraphicUtils.java @@ -801,19 +801,11 @@ public final class GraphicUtils { * @return the native icon, otherwise default document icon. */ public static Icon getIcon(File file) { - try { - sun.awt.shell.ShellFolder sf = sun.awt.shell.ShellFolder - .getShellFolder(file); - - // Get large icon - return new ImageIcon(sf.getIcon(true), sf.getFolderType()); - } catch (Exception e) { - try { - return new JFileChooser().getIcon(file); - } catch (Exception e1) { - // Do nothing. - } - } + try { + return new JFileChooser().getIcon(file); + } catch (Exception e) { + Log.debug("unable to get icon"); + } return SparkRes.getImageIcon(SparkRes.DOCUMENT_INFO_32x32); }