there is some method use 'double lock check' to to get Singleton object,
like:
public static Dictionary initial(Configuration cfg){
if(singleton == null){
synchronized(Dictionary.class){
if(singleton == null){
singleton = new Dictionary(cfg);
return singleton;
}
}
}
return singleton;
}
but double lock check have been proved to be wrong in java, so please help to
modify.
you can google: java double lock check, to get more details.
Original issue reported on code.google.com by hjq20021...@gmail.com on 30 May 2012 at 4:10
Original issue reported on code.google.com by
hjq20021...@gmail.com
on 30 May 2012 at 4:10