Bugs item #1430800, was opened at 2006-02-13 18:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1430800&group_id=27895
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: In-Memory Impl
Group: TM4J 0.9.7
Status: Open
Resolution: None
Priority: 5
Submitted By: Thomas Much (thmuch)
Assigned to: Nobody/Anonymous (nobody)
Summary: getMembersOfRole cannot search for null roleSpec
Initial Comment:
AssociationImpl.getMembersOfRole(null) crashes with a NPE instead of returning all members without a role type. A possible fix:
public Collection getMembersOfRole(Topic roleSpec) {
Collection ret = new ArrayList();
Iterator it = m_members.iterator();
if (roleSpec == null) {
while (it.hasNext()) {
Member m = (Member) it.next();
Topic rs = m.getRoleSpec();
if (rs == null) {
ret.add( m );
}
}
}
else {
// old while loop
}
return Collections.unmodifiableCollection(ret);
}
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1430800&group_id=27895
|