On Sat, 5 Apr 2003, Conor MacNeill <[EMAIL PROTECTED]> wrote: > It's funny that Stefan, who only voted +0, is the first to make a > change that requires JDK 1.2 :-)
I couldn't find a workaround, that's all (yes, I've seen that smiley). Having said that, I could have left all toStrings as they were after making sure that the StringBuffers didn't get reused. The real bad things happen in StringBuffer#setLength and only if the StringBuffer is "shared", which happens after calling toString. Not calling toString avoids the "sharing" part, not reusing StringBuffers avoids both, sharing and the calls to setLength. This means that we've now traded a certain amount of memory that cannot get reclaimed by the GC in 1.4.1 for more objects that can get garbage collected. I.e. we could see some negative performance impact. The JDepend change would have required yet another (i.e. a third) layer of indirection via reflection. Let's say I'm lazy. ;-) Have nice weekend Stefan