// private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
private final ThreadLocal<SimpleDateFormat> dateFormat =
ThreadLocal.withInitial(() -> new SimpleDateFormat("yyyy-MM-dd"));
...
System.out.println(dateFormat.get().format(new Date()));