Bug 167525 - [Presence] RosterEntry and RosterGroup's toString() implementation will get in an infinite loop
Summary: [Presence] RosterEntry and RosterGroup's toString() implementation will get i...
Status: CLOSED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ecf.core-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-12-11 22:32 EST by Remy Suen CLA
Modified: 2008-05-18 14:57 EDT (History)
1 user (show)

See Also:


Attachments
Project-level patch to change RosterEntry's toString() implementation. (1.58 KB, patch)
2006-12-11 22:34 EST, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2006-12-11 22:32:55 EST
The RosterGroup will display the contents of its IRosterEntries, and the RosterEntry will display information about the IRosterGroups it is is, so it goes on forever.

Code below illustrates the problem:
IRosterGroup group = new RosterGroup("Group Name");
IRosterEntry entry = new RosterEntry(IDFactory.getDefault()
				.createGUID(), IDFactory.getDefault().createGUID(), "Name");
group.add(entry);
group.toString();
Comment 1 Remy Suen CLA 2006-12-11 22:34:36 EST
Created attachment 55457 [details]
Project-level patch to change RosterEntry's toString() implementation.

RosterEntry seemed like the logical choice to fix since for an IRosterGroup we would want the information about its entries, whereas for an IRosterEntry we probably just want its names (I guess?).
Comment 2 Scott Lewis CLA 2006-12-11 22:41:08 EST
Fixed by removing printing of associated groups from RosterEntry.toString().  Thanks Remy for report.
Comment 3 Scott Lewis CLA 2006-12-11 22:47:24 EST
Put in patch so groups would be displayed for RosterEntry.toString().  Probably overkill, but why not? :)  Thanks Remy.
Comment 4 Scott Lewis CLA 2008-05-18 14:57:18 EDT
closing