1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-03-13 01:09:53 -09:00

Removed dangerous instance of double-checked locking in ThemePluginImpl

This commit is contained in:
Danny Plenge 2018-03-20 16:10:09 +01:00
parent 3e1312064f
commit 90631eff60

View file

@ -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);
}