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


##########
daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/DelimiterUnparsers.scala:
##########
@@ -54,6 +55,15 @@ class DelimiterTextUnparser(
       s"Unparsing starting at bit position: 
${state.dataOutputStream.maybeAbsBitPos0b}",
     )
 
+    // Do not emit the delimiter if the value is empty and the 
emptyValueDelimiterPolicy
+    // indicates it should be suppressed
+    if (state.currentInfosetNode.isSimple) {
+      val node = state.currentInfosetNode.asSimple
+      if (node.hasValue && node.isEmpty && !requiredOnEmptyValue) {
+        return

Review Comment:
   Return is "maintenance unstable" in scala.  You modify the code at some 
point and an exception gets involved and then the return ends up causing real 
problems. 
   
   Best to remove them. They don't compose well with exception throw/catch/try 
or Try objects. 



-- 
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