@ -45,6 +48,11 @@ public class SingletonSupplier<T> implements Supplier<T> {
@@ -45,6 +48,11 @@ public class SingletonSupplier<T> implements Supplier<T> {
@ -90,7 +98,8 @@ public class SingletonSupplier<T> implements Supplier<T> {
@@ -90,7 +98,8 @@ public class SingletonSupplier<T> implements Supplier<T> {
publicTget(){
Tinstance=this.singletonInstance;
if(instance==null){
synchronized(this){
this.writeLock.lock();
try{
instance=this.singletonInstance;
if(instance==null){
if(this.instanceSupplier!=null){
@ -102,6 +111,9 @@ public class SingletonSupplier<T> implements Supplier<T> {
@@ -102,6 +111,9 @@ public class SingletonSupplier<T> implements Supplier<T> {