cid#1326345 Check of thread-shared field evades lock acquisition
Change-Id: I11fc66358c13c6bb1b6f109980384131b38ef18b
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user