Confusion about thread safety - SimpleDateFormat example
问题 I have a question about thread safety. From what I have been told, SimpleDateFormat is not thread safe. I was wondering what effects it would have if I use it the following way in my spring controller: private final static SimpleDateFormat dateFormat = new SimpleDateFormat("EEE MMM dd yyyy", Locale.US); Later in my of my controller functions I use it as follows: try { changedate = changedate.substring(0, 15); calcDate = dateFormat.parse(changedate); } catch (ParseException e2) { logger.error(