diff options
-rw-r--r-- | scripting/java/com/sun/star/script/framework/browse/DialogFactory.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java index 303b600e2e3b..08cfba4c8e8b 100644 --- a/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java +++ b/scripting/java/com/sun/star/script/framework/browse/DialogFactory.java @@ -46,15 +46,12 @@ public class DialogFactory { // singleton private DialogFactory(XComponentContext xComponentContext) { this.xComponentContext = xComponentContext; - factory = this; } public static void createDialogFactory(XComponentContext xComponentContext) { - if (factory == null) { - synchronized (DialogFactory.class) { - if (factory == null) { - factory = new DialogFactory(xComponentContext); - } + synchronized (DialogFactory.class) { + if (factory == null) { + factory = new DialogFactory(xComponentContext); } } } @@ -63,7 +60,6 @@ public class DialogFactory { if (factory == null) { throw new java.lang.Exception("DialogFactory not initialized"); } - return factory; } |