james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Fondermann" <bernd.fonderm...@googlemail.com>
Subject Re: [JAMESHandler] Streams in AbstractJamesHandler
Date Sat, 05 Apr 2008 21:34:28 GMT
On Sat, Apr 5, 2008 at 10:54 PM, Stefano Bagnara <apache@bago.org> wrote:
> Bernd Fondermann ha scritto:
>
> >
> > On Sat, Apr 5, 2008 at 11:19 AM, Robert Burrell Donkin
> >
> >
> > >  #2 logging the full stack trace at error seems like it's going to fill
> > >  up the logs pretty quickly if someone tries a DOS. seems better to
> > >  WARN with a brief message and then log details at debug.
> > >
> >
> > +1. plus we don't need the StringBuffer. javac optimizes simple String
> > concatenations.
> > Would make the code a lot easier to read + maintain.
> >
>
>  It is funny to read this from you ;-) [1]
>  AFAIK javac correctly optimizes simple String concatenation using
> StringBuilders since jdk 1.5 [2].
>
>  That said, I think that even in jdk 1.4 and in our specific case (where
> network communication is involved too) modern jvm are optimized enough that
> I prefer pure string concatenation to "hard to read" StringBuffer chains.
>
>  [1] http://www.mail-archive.com/server-dev@james.apache.org/msg11826.html
>  [2]
>  http://www.mail-archive.com/server-dev@james.apache.org/msg11822.html

:-)

  Bernd

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


Mime
View raw message