You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Jon Stevens <jo...@latchkey.com> on 2001/03/23 04:17:39 UTC
Re: cvs commit: jakarta-turbine/src/java/org/apache/turbine/util
HttpUtils.java
on 3/22/01 4:28 PM, "dlr@apache.org" <dl...@apache.org> wrote:
> + public static String formatHttpDate(Date date)
> {
> - return httpDateFormat.format(date);
> + synchronized (httpDateFormat)
> + {
> + return httpDateFormat.format(date);
> + }
> }
I would like to see the bytecode decompiled to show that there really is an
advantage here...my gut instinct (and hope) would be that the compile would
optimize this into the same bytecode...
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-turbine/src/java/org/apache/turbine/util HttpUtils.java
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jon Stevens <jo...@latchkey.com> writes:
> on 3/22/01 4:28 PM, "dlr@apache.org" <dl...@apache.org> wrote:
>
> > + public static String formatHttpDate(Date date)
> > {
> > - return httpDateFormat.format(date);
> > + synchronized (httpDateFormat)
> > + {
> > + return httpDateFormat.format(date);
> > + }
> > }
>
> I would like to see the bytecode decompiled to show that there really is an
> advantage here...my gut instinct (and hope) would be that the compile would
> optimize this into the same bytecode...
I sure as hell hope it wouldn't--I changed the object that is being
synchronized on.
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org