Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.3, EE-3.3.0.GA
-
Fix Version/s: EE-3.3.0.GA_P01, 4.0.BETA, 4.0
-
Component/s: Framework
-
Labels:None
-
Environment:Any
-
Assignee Priority:P1
-
Salesforce Case Reference:
Description
In the org.icefaces.impl.util.Util class, we provide a static DateFormat for formatting and parsing dates for HTTP headers:
public static final DateFormat HTTP_DATE =
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
This utility is used throughout our code (components, ACE, framework). However, according to the JavaDoc for DateFormat:
"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."
We should change our technique to provide thread-safe acquisition and use of the formatter.
public static final DateFormat HTTP_DATE =
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
This utility is used throughout our code (components, ACE, framework). However, according to the JavaDoc for DateFormat:
"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."
We should change our technique to provide thread-safe acquisition and use of the formatter.
Issue Links
- blocks
-
ICE-9546 Non-thread safe DateFormat usage causing ArrayIndexOutOfBoundsException
-
- Closed
-
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Field | Original Value | New Value |
---|---|---|
Salesforce Case Reference | 5007000000VH424AAD |
Assignee | Mircea Toma [ mircea.toma ] | |
Assignee Priority | P1 [ 10010 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Fix Version/s | 4.0 [ 11382 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |