From: Erik V. <ev...@us...> - 2010-05-16 20:59:20
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv6252/rails/game Modified Files: OperatingRound.java Log Message: Prevented concurrent modification when closing privates Index: OperatingRound.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** OperatingRound.java 15 May 2010 16:36:09 -0000 1.130 --- OperatingRound.java 16 May 2010 20:59:12 -0000 1.131 *************** *** 505,508 **** --- 505,514 ---- int station = action.getChosenStation(); String companyName = operatingCompany.getName(); + + // TEMPORARY FIX to enable fixing invalidated saved files + //if ("N11".equals(hex.getName()) && station == 2) { + // station = 1; + // action.setChosenStation(1); + //} // Dummy loop to enable a quick jump out. *************** *** 1467,1473 **** companiesOperatedThisRound.add(operatingCompany); ! // Check if any privates must be closed ! // (now only applies to 1856 W&SR) ! for (PrivateCompanyI priv : operatingCompany.getPortfolio().getPrivateCompanies()) { priv.checkClosingIfExercised(true); } --- 1473,1480 ---- companiesOperatedThisRound.add(operatingCompany); ! // Check if any privates must be closed (now only applies to 1856 W&SR) ! // Copy list first to avoid concurrent modifications ! for (PrivateCompanyI priv : ! new ArrayList<PrivateCompanyI> (operatingCompany.getPortfolio().getPrivateCompanies())) { priv.checkClosingIfExercised(true); } *************** *** 1631,1634 **** --- 1638,1644 ---- if (exchangedTrain == null) { errMsg = LocalText.getText("NoExchangedTrainSpecified"); + // TEMPORARY FIX to clean up invalidated saved files - DOES NOT WORK!!?? + //exchangedTrain = operatingCompany.getPortfolio().getTrainList().get(0); + //action.setExchangedTrain(exchangedTrain); break; } else if (operatingCompany.getPortfolio().getTrainOfType(exchangedTrain.getType()) == null) { |