[Megameknet-cvs] MegaMekNET/src/server/campaign CampaignMain.java,1.124,1.125
Status: Inactive
Brought to you by:
mcwizard
From: Immanuel S. <im...@us...> - 2005-04-11 19:14:00
|
Update of /cvsroot/megameknet/MegaMekNET/src/server/campaign In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20235/src/server/campaign Modified Files: CampaignMain.java Log Message: fixed concurent modification bug in blackboard Index: CampaignMain.java =================================================================== RCS file: /cvsroot/megameknet/MegaMekNET/src/server/campaign/CampaignMain.java,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** CampaignMain.java 9 Apr 2005 12:56:38 -0000 1.124 --- CampaignMain.java 11 Apr 2005 19:13:19 -0000 1.125 *************** *** 626,630 **** out = new FileOutputStream("./campaign/blackboard.dat"); print = new PrintStream(out); ! for (Iterator it = blackBoard.allMessages().iterator(); it.hasNext();) { BlackBoardMessage bbm = (BlackBoardMessage) it.next(); print.println(bbm.encode()); --- 626,630 ---- out = new FileOutputStream("./campaign/blackboard.dat"); print = new PrintStream(out); ! for (Iterator it = blackBoard.iterator(); it.hasNext();) { BlackBoardMessage bbm = (BlackBoardMessage) it.next(); print.println(bbm.encode()); *************** *** 1731,1738 **** // BlackBoard ! for (Iterator it = blackBoard.allMessages().iterator(); it.hasNext();) { BlackBoardMessage bbm = (BlackBoardMessage) it.next(); if (bbm.decreaseTick()) ! blackBoard.removeMessage(bbm.getTitle()); } --- 1731,1738 ---- // BlackBoard ! for (Iterator it = blackBoard.iterator(); it.hasNext();) { BlackBoardMessage bbm = (BlackBoardMessage) it.next(); if (bbm.decreaseTick()) ! it.remove(); } |