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:
parent
3e1312064f
commit
90631eff60
1 changed files with 32 additions and 36 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue