From: SourceForge.net <no...@so...> - 2006-03-08 08:05:28
|
Bugs item #1430800, was opened at 2006-02-13 17:26 Message generated for change (Settings changed) made by kal_ahmed 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: Closed >Resolution: Fixed 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 |