On 19/06/2009, Xie Xiaodong <xxd82...@gmail.com> wrote: > No, I think line767 is still needed. You could turn to the last part of this > article for reference: " > http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html".
Oops, my bad. The code would still work, but it would sometimes create a new Date unecessarily. > > > 2009/6/19 sebb <seb...@gmail.com> > > > > On 19/06/2009, sebb <seb...@gmail.com> wrote: > > > Just spotted this duplicate code in AccessLogValve: > > > > > > 661: if (!dateStamp.equals(tsDate)) { > > > 662: if (!dateStamp.equals(tsDate)) { > > > > > > Not sure this double-checked looking offers any benefit ;-) > > > > > > > Line 767 is also no longer needed, as currentMillis is now volatile: > > > > 765: if ((systime - currentMillis) > 1000) { > > 766: synchronized (this) { > > 767: if ((systime - currentMillis) > 1000) { > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: dev-h...@tomcat.apache.org > > > > > > > -- > Sincerely yours and Best Regards, > > Xie Xiaodong > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org