commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 16676] - StackOverflow due to ToStringBuilder
Date Fri, 14 Mar 2003 03:17:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16676>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16676

StackOverflow due to ToStringBuilder





------- Additional Comments From alex@apache.org  2003-03-14 03:17 -------
It might be better to use a ThreadLocal rather than a static to hold the         registry...
In fact, it wouldn't need to be a Map, but a Set (maybe a HashSet) containing all objects
currently being toStringed on this thread.   Also, why bother saying "cycle detected" -- why
not just return the identity       code?  Like, for a foo that points to a bar and back again:
            Foo@123[bar=Bar@456[foo=Foo@123]]            That's reasonably legible.

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


Mime
View raw message