Double-checked locking and volatile

This commit is contained in:
thinkgem
2020-10-28 12:36:38 +08:00
parent f48a7b38d2
commit b23e65fed9

View File

@@ -31,7 +31,7 @@ import org.patchca.word.RandomWordFactory;
public class CaptchaUtils {
private static Random random = new Random();
private static ConfigurableCaptchaService ccs;
private volatile static ConfigurableCaptchaService ccs;
private static WobbleRippleFilterFactory wrff; // 摆波纹
private static DoubleRippleFilterFactory doff; // 双波纹
private static CurvesRippleFilterFactory crff; // 曲线波纹