tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: getCurrentTimeMillis definition in JDBCAccessValve
Date Mon, 02 Aug 2010 22:33:39 GMT
> From: Mark Thomas [mailto:markt@apache.org]
> Subject: Re: getCurrentTimeMillis definition in JDBCAccessValve
> 
> Speed. This way we only generate a new date string every 1s.

But why generate the Date instance at all?  Since System.currentTimeMillis() is being called
every time, why not return that value, rather than ever creating a Date object with a specific
time just to return the time value it was constructed with?  The Date object itself is not
used outside the scope of this one method.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus
for use only by the intended recipient. If you received this in error, please contact the
sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message