> ... so OJB found a bug in your code ;-) i'm thinking about replacing my unit test with ojb, it's the perfect tool to find bugs ;-)
-----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Monday, April 04, 2005 5:54 PM To: OJB Users List Subject: Re: problem with ojb when overwriting the toString() method ... so OJB found a bug in your code ;-) Armin G�nther Wieser wrote: > hi, > > finally i found the problem. i started to make my tests more complex, > and then i found the big error (and the reason why i get a stack > overflow): i have objects that are liked bidirectionally with each > other. i call > toString() on one of these objects, it dumps all private fields > INCLUDING the referenced object. as the referenced object's toString() > method is called, and as it references itself the first object again, > a circular reference is being established, a lot of toString() methods > on the same objects are being called again and again, and the stack overflow happens. > didn't see that happening in my code before as i called toString() on > my objects BEFORE i linked them bidirectionally..... > > kr, > guenther > > -----Original Message----- > From: Thomas Franke [mailto:[EMAIL PROTECTED] > Sent: Monday, April 04, 2005 3:12 PM > To: OJB Users List > Subject: Re: problem with ojb when overwriting the toString() method > > G�nther Wieser wrote: > > >>hmm, haven't seen any error so far when using the toString() method of >>objects of this class so far. >>what the toString() method does is to get all private fields of the >>object by introspection and fill a string buffer with the name of the >>field and the value. > > Could I take a look on your source code? > > regards > > Thomas > -- > Mit freundlichen Gr��en > > Thomas Franke > > Gesch�ftsf�hrer > Leiter Entwicklung > ------------------------------ > the energy for a better world > ------------------------------ > softEnergy GmbH > Platz der Freundschaft 1 > 18059 Rostock > ------------------------------ > fon: +49 381 40 587 535 > fax: +49 381 40 587 555 > mobil: +49 1715222015 > > http://www.softenergy.de > mail: [EMAIL PROTECTED] > ------------------------------ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
