mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
The static SimpleDateFormat instance in AbstractMockHttpServletRequestBuilder is shared across all instances. SimpleDateFormat.format() mutates internal Calendar state and is not thread-safe, which can produce corrupt date strings or ArrayIndexOutOfBoundsException when tests run in parallel. Replace with DateTimeFormatter which is immutable and thread-safe. Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>