diff --git a/src/main/java/com/metaweb/gridworks/history/History.java b/src/main/java/com/metaweb/gridworks/history/History.java index 3eba08dbd..227276549 100644 --- a/src/main/java/com/metaweb/gridworks/history/History.java +++ b/src/main/java/com/metaweb/gridworks/history/History.java @@ -50,7 +50,7 @@ public class History implements Jsonizable { return (Change) load.invoke(null, reader, pool); } - static public void writeOneChange(OutputStream out, Change change, Pool pool) throws Exception { + static public void writeOneChange(OutputStream out, Change change, Pool pool) throws IOException { Writer writer = new OutputStreamWriter(out); try { History.writeOneChange(writer, change, pool); @@ -59,14 +59,18 @@ public class History implements Jsonizable { } } - static public void writeOneChange(Writer writer, Change change, Pool pool) throws Exception { - writer.write(Gridworks.getVersion()); writer.write('\n'); - writer.write(change.getClass().getName()); writer.write('\n'); - + static public void writeOneChange(Writer writer, Change change, Pool pool) throws IOException { Properties options = new Properties(); options.setProperty("mode", "save"); options.put("pool", pool); + writeOneChange(writer, change, options); + } + + static public void writeOneChange(Writer writer, Change change, Properties options) throws IOException { + writer.write(Gridworks.getVersion()); writer.write('\n'); + writer.write(change.getClass().getName()); writer.write('\n'); + change.save(writer, options); } diff --git a/src/main/java/com/metaweb/gridworks/model/changes/MassChange.java b/src/main/java/com/metaweb/gridworks/model/changes/MassChange.java index a9011308f..f5ab78c2b 100644 --- a/src/main/java/com/metaweb/gridworks/model/changes/MassChange.java +++ b/src/main/java/com/metaweb/gridworks/model/changes/MassChange.java @@ -49,7 +49,7 @@ public class MassChange implements Change { writer.write("updateRowContextDependencies="); writer.write(Boolean.toString(_updateRowContextDependencies)); writer.write('\n'); writer.write("changeCount="); writer.write(Integer.toString(_changes.size())); writer.write('\n'); for (Change c : _changes) { - c.save(writer, options); + History.writeOneChange(writer, c, options); } writer.write("/ec/\n"); // end of change marker }