[slf4j-dev] svn commit: r1086 - in slf4j/trunk/slf4j-api/src: main/java/org/slf4j/helpers test/java/org/slf4j/helpers

Ceki Gulcu listid at qos.ch
Fri Aug 1 21:29:59 CEST 2008



Jörn Huxhorn wrote:
> Damn, you are right!

> There's still a problem with your deeplyAppendParameter method: It's not
> handling recursive arrays yet.

Yes, indeed.

> While this isn't a terribly realistic case it would cause a stack overflow
> at the moment. Take a look at the 1.5 implementation of deepToString, it's
> using a HashSet (called dejaVu :D) to prevent this.

The probability of passing a cyclical array is very low. Moreover, if and when 
it happens, the user will immediately know the cause of the failure. The 
StackOverflowError will point to MessageFormatter.deeplyAppendParameter method, 
so it will be easy to identify. If the bug were hard to identify, then it would 
have been an entirely different matter. At this stage, I am just too lazy to be 
bothered.

> Yes, I'm watching your code... I hope that doesn't make you paranoid ;)

Not at all. On the contrary, it keeps me sharp. Well, only relatively sharp. You 
can lead a camel to water but you can't make it drink. :-)

-- 
Ceki Gülcü

QOS.ch is looking to hire talented developers located in Switzerland
to work on cutting-edge software projects. If you think you are
qualified, then please contact ceki at qos.ch.



More information about the slf4j-dev mailing list