Example #1
0
  // fixme todo change all to XML serialization, so class versions are NOT an issue !
  public void saveSerializedData() {

    // saveXML();
    try {
      lastRace.setName(getName());
      lastRace.saveSerializedData();
      String filename = getName() + ".ser";

      FileOutputStream fileOut = new FileOutputStream(filename);
      ObjectOutputStream out =
          new ObjectOutputStream(
              fileOut); /// MUST FIX 2016 Nationals ERROR CONCurrentMpdificationException
      out.writeObject(
          this); // See   Ref#20161008 This was Line 913 BELOW on 20161008   //// This was line 869
      // in bwlow Log -->> Got CONCurrentMpdificationException ///20160727 in test
      /*
                  PRIOR CRASH  Prior to 20161008  See bottom of source file for new carsh dump
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:329)
      	at com.tcay.slalom.Race.saveSerializedData(Race.java:869)
      	at com.tcay.slalom.Race.updateResults(Race.java:1177)
      	at com.tcay.slalom.Race.updateResults(Race.java:1168)
      	at com.tcay.slalom.RaceRun.updateResults(RaceRun.java:535)
      	at com.tcay.slalom.RaceRun.setPhotoCellRaceRun(RaceRun.java:139)
      	at com.tcay.slalom.Race.associatePhotoCellRun(Race.java:1163)
      	at com.tcay.slalom.timingDevices.PhotoCellAgent.saveResult(PhotoCellAgent.java:57)
      	at com.tcay.slalom.timingDevices.tagHeuer.TagHeuerAgent.processDeviceOutput(TagHeuerAgent.java:174)
      	at com.tcay.RS232.PhotoEyeListener.readAndProcess(PhotoEyeListener.java:241)
      	at com.tcay.RS232.PhotoEyeListener.processPhotoEyeDataFromDevice(PhotoEyeListener.java:190)
      	at com.tcay.RS232.PhotoEyeListener.listenAndProcessPortOutput(PhotoEyeListener.java:304)
      	at com.tcay.RS232.PhotoEyeListener.run(PhotoEyeListener.java:76)
                  */

      out.close();
      fileOut.close();
      log.trace("Saved serialized data to " + filename);

    } catch (IOException i) {
      i.printStackTrace();
    }
  }
Example #2
0
 public void setName(String name) {
   this.name = name;
   lastRace.setName(name);
   lastRace.saveSerializedData();
 }