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/[email protected]/msg11826.html
[2]
http://www.mail-archive.com/[email protected]/msg11822.html

 #9 these fields only seem to be used when logging exceptions. reverse
 DNS lookups have a tendency to be expensive and will often not produce
 any useful information. this cost is paid every time that a connection
 is started. is this worthwhile?

AFAIK, dnsServer uses a cache - but the question remains valid.
probably, in the end, it is worthwhile - even indespensible - in
certain failure situations. ;-)

Some handler might require checks on the remote hostname. Mailets have access to the remote hostname, too. I guess lazy "resolving" is not an option because it will happen almost always (I've not checked the code, but this is my feeling about this).

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to