diff options
Diffstat (limited to 'scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java index fb88968159a8..34061c473847 100644 --- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java +++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java @@ -94,18 +94,12 @@ public class ScriptEditorForBeanShell /** * Returns the global ScriptEditorForBeanShell instance. */ - public static ScriptEditorForBeanShell getEditor() + public static synchronized ScriptEditorForBeanShell getEditor() { if (theScriptEditorForBeanShell == null) { - synchronized(ScriptEditorForBeanShell.class) - { - if (theScriptEditorForBeanShell == null) - { - theScriptEditorForBeanShell = - new ScriptEditorForBeanShell(); - } - } + theScriptEditorForBeanShell = + new ScriptEditorForBeanShell(); } return theScriptEditorForBeanShell; } |