SimpleDateFormat线程安全有关问题

SimpleDateFormat线程安全问题private static ThreadLocalDateFormat threadLocalSDF new ThreadLocal

SimpleDateFormat线程安全问题

    private static ThreadLocal<DateFormat> threadLocalSDF = new ThreadLocal<DateFormat>();    public static DateFormat getShortDateFormat() {        DateFormat df = threadLocalSDF.get();        if (df == null) {            df = new SimpleDateFormat("yyMMdd");            threadLocalSDF.set(df);        }        return df;    }