Removed dangerous instance of double-checked locking in ThemePluginImpl
@@ -150,9 +150,7 @@ public class ThemePluginImpl implements ThemePlugin {
return bgPanel;
}
- private ImagePanel createImagePanelInstance() {
- if (background == null) {
- synchronized (ThemePluginImpl.class) {
+ private synchronized ImagePanel createImagePanelInstance() {
if (background == null) {
String filename = "/background.png";
try {
@@ -190,8 +188,6 @@ public class ThemePluginImpl implements ThemePlugin {
return null;
}
}
- }
- }
return new ImagePanel(background, ImagePanelStyle.SCALED);
}
