[Megameknet-cvs] MegaMekNET/src/common BlackBoard.java,1.2,1.3
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-11 19:13:29
|
Update of /cvsroot/megameknet/MegaMekNET/src/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20235/src/common Modified Files: BlackBoard.java Log Message: fixed concurent modification bug in blackboard Index: BlackBoard.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/common/BlackBoard.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BlackBoard.java 26 Mar 2005 12:22:16 -0000 1.2 --- BlackBoard.java 11 Apr 2005 19:13:20 -0000 1.3 *************** *** 14,21 **** package common; - import java.util.Collection; - import java.util.Collections; import java.util.Iterator; ! import java.util.LinkedList; import common.visitor.Visitor; import common.visitor.Visitorable; --- 14,19 ---- package common; import java.util.Iterator; ! import java.util.Vector; import common.visitor.Visitor; import common.visitor.Visitorable; *************** *** 28,39 **** public class BlackBoard implements Visitorable { - private LinkedList data = new LinkedList(); - /** ! * Return all messages. To delete black board messages, please use ! * removeMessage. */ ! public Collection allMessages() { ! return Collections.unmodifiableCollection(data); } --- 26,36 ---- public class BlackBoard implements Visitorable { /** ! * Vector because access via Iterator has to be synchronized. */ ! private Vector data = new Vector(); ! ! public Iterator iterator() { ! return data.iterator(); } |