Details
Description
In our class:
icefaces/core/src/main/java/org/icefaces/impl/util/Util.java, to
We set up a static DateFormat:
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
However, if the default is something other than English, a parsing exception can occur. The forum poster points to the relevant W3C spec:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
and suggests making the following adjustment.
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
icefaces/core/src/main/java/org/icefaces/impl/util/Util.java, to
We set up a static DateFormat:
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz");
However, if the default is something other than English, a parsing exception can occur. The forum poster points to the relevant W3C spec:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
and suggests making the following adjustment.
public static final DateFormat HTTP_DATE = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.ENGLISH);
Issue Links
- is duplicated by
-
ICE-6186 Compat resource servlet fail to parse modified header
- Closed
Activity
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P1 |
Mircea Toma
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23148 | Wed Nov 17 15:14:48 MST 2010 | mircea.toma | |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/util/Util.java
|
Ken Fyten
made changes -
Salesforce Case | [] | |
Assignee Priority | P1 |
Deryk Sinotte
made changes -
Summary | Non-English locales lead to an exception when parsing dates.I | Non-English locales lead to an exception when parsing dates |
Salesforce Case | [] |
Deryk Sinotte
made changes -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 2.0.0 [ 10230 ] | |
Assignee | Mircea Toma [ mircea.toma ] |
Deryk Sinotte
created issue -
SimpleDateFormat is not thread safe so it should not be declared static and reused in a class unless access to the code is synchronized.