mbeckerle commented on code in PR #886:
URL: https://github.com/apache/daffodil/pull/886#discussion_r1043831416


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/DataProcessor.scala:
##########
@@ -311,18 +271,13 @@ class DataProcessor private (
     val oos = new ObjectOutputStream(new GZIPOutputStream(os))
 
     //
-    // Make a copy of this object, so that our state mods below don't 
side-effect the user's object.
-    // Saving shouldn't have side-effects on the state of the object.
-    //
-    //
-    // Note that the serialization system *does* preserve these two settings. 
This is for general serialization
-    // that may be required by other software (e.g., Apache Spark)
+    // Make a copy of this object so that we can make its saved state
+    // different than its original state.  Note that the serialization
+    // system *does* preserve validationMode since it may be required by
+    // other software like Apache Spark. But for our save/reload purposes,
+    // we don't want validationMode preserved.
     //
-    // But for our save/reload purposes, we don't want them preserved.
-    //
-
     val dpToSave = this.copy(
-      externalVars = Queue.empty[Binding], // explicitly set these to empty so 
restored processor won't have them.

Review Comment:
   Ah. Yes, steve is right.  We do want the originalVariables. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to