cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: svn commit: r643293 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/WebContinuationDataBean.java
Date Wed, 02 Apr 2008 02:03:57 GMT
On 01.04.2008 08:02, Vadim Gritsenko 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.

All these nice little gems hidden in Apache Commons libs :)

Applied.

Thanks,

Joerg

Mime
View raw message