cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: svn commit: r643293 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
Date Tue, 01 Apr 2008 12:02:17 GMT
On Apr 1, 2008, at 2:17 AM, joerg@apache.org wrote:
> fix threading issue (DateFormat is not thread-safe)
>
>     public String getLastAccessTime() {
> -        return formatter.format(new Date(wc.getLastAccessTime()));
> +        synchronized (this.formatter) {
> +            return formatter.format(new  
> Date(wc.getLastAccessTime()));
> +        }
>     }

The better fix is to use FastDateFormat which features thread safe  
formatting.

Vadim

Mime
View raw message