Icon () { Icon icon = myIcon; if (icon == null) { if (myIconPath != null) { icon = IconLoader.getIcon(myIconPath, UserFileType.class.getClassLoader()); myIcon = icon; } if (icon == null) { // to not load PlatformIcons on UserFileType instantiation icon = PlatformIcons.CUSTOM_FILE_ICON; } } return icon; }