https://issues.apache.org/bugzilla/show_bug.cgi?id=46857
Summary: Thread-unsafe use of DateFormat
Product: Ant
Version: 1.7.1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
The class org.apache.tools.ant.util.DateUtils has static field
DATE_HEADER_FORMAT of type DateFormat. This type is unsafe for multithreaded
use (from JavaDoc: "Date formats are not synchronized. It is recommended to
create separate format instances for each thread. If multiple threads access a
format concurrently, it must be synchronized externally.")
So either method getDateFromFormat (the only one using DATE_HEADER_FORMAT)
should be synchronized or new synchronized methods for accessing
DATE_HEADER_FORMAT should be written
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.