Short answer
SimpleDateFormat is mutable and not thread-safe, yet developers routinely cached one in a static field and shared it across threads, producing intermittent parse corruption and wrong dates under load — a notorious heisenbug.
Explanation
The java.time replacement, DateTimeFormatter, is immutable and thread-safe, so a single instance can be shared as a constant safely. It also has predefined ISO formatters and a clearer pattern/builder API, removing both the concurrency hazard and much of the old format-string ambiguity.
Common mistakes
- Sharing a SimpleDateFormat between threads.
- Not using the immutable, thread-safe DateTimeFormatter.