You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/08/31 12:41:58 UTC

[GitHub] [daffodil] mbeckerle commented on a diff in pull request #833: WIP: Draft - Allow UStateForSuspension to be created without infoset DINode

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


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/unparsers/UState.scala:
##########
@@ -394,8 +397,10 @@ final class UStateForSuspension(
   extends UState(vbox, mainUState.diagnostics, mainUState.dataProc, tunable, areDebugging) {
 
   dState.setMode(UnparserBlocking)
-  dState.setCurrentNode(thisElement.asInstanceOf[DINode])
-  dState.setContextNode(thisElement.asInstanceOf[DINode])
+  if (currentInfosetNodeMaybe.isDefined) {
+    dState.setCurrentNode(thisElement.asInstanceOf[DINode])
+    dState.setContextNode(thisElement.asInstanceOf[DINode])
+  }

Review Comment:
   I concur, these changes are likely the wrong thing and will get backed out. 
   
   The path I will proceed on is to first determine why this splitDOS operation is being missed and delayed to this point. Also I will be seeking a way to establish and check the invariant that this sort of thing is overwith at the end of parsing, so that we'll get a loud assertion failure if something does this, where it has to split sfter unparse is complete. 



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org