commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory" <ggreg...@seagullsw.com>
Subject RE: Question about ToStringStyle.appendInternal() method
Date Thu, 25 Mar 2004 01:03:05 GMT
Roy,

Could you please create a Bugzilla ticket and attach a test case? That
would make it much easier for one of us to reproduce and deal with.

Thank you,
Gary

> -----Original Message-----
> From: Roy_Lu@Toyota.com [mailto:Roy_Lu@Toyota.com]
> Sent: Wednesday, March 24, 2004 16:25
> To: commons-dev@jakarta.apache.org
> Subject: Question about ToStringStyle.appendInternal() method
> 
> Hi,
> 
> I was trying to figure out an infinate loop problem when I am printing
out
> an object. I have an object 'a' of class 'A' which has a collection of
> object 'b' of class 'B', and 'B' has a reference back to 'A'. The
> toString() method of both 'A' and 'B' contains each other. When I
tried to
> print 'a' out, I got into an infinate loop.
> 
> From looking at the source code of ToStringStyle.java, it appears to
me
> that its appendInternal() method never registers the object to be
printed
> to the registry. Therefore, the if check on the first line of this
method
> "if (ReflectionToStringBuilder.isRegistered(value)" always returns
false,
> and thus result in an infinate loop.
> 
> Please let me know if this is the case. Thanks.
> 
> Roy



---------------------------------------------------------------------
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