mbeckerle commented on code in PR #1105:
URL: https://github.com/apache/daffodil/pull/1105#discussion_r1376577177
##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/cookers/EntityReplacer.scala:
##########
@@ -774,18 +763,14 @@ class NonEmptyListOfStringLiteral(pn: String,
allowByteEntities: Boolean)
override def testCooked(cookedList: List[String], context: ThrowsSDE) = {
context.schemaDefinitionUnless(
- cookedList.exists { _.length > 0 },
+ cookedList.length > 0,
"Property dfdl:%s cannot be empty string. Use dfdl:nilValue='%%ES;' for
empty string as nil value.",
Review Comment:
This messsage mentions dfdl:nilValue but at least in theory it is not the
only property that would use this cooker.
Just drop the property name. I think the message is ok without it. Or pass
it in as a parameters somehow.
##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/cookers/EntityReplacer.scala:
##########
@@ -889,16 +874,16 @@ class
NonEmptyListOfStringLiteralCharClass_ES_WithByteEntities(pn: String)
override def testCooked(cookedList: List[String], context: ThrowsSDE) = {
context.schemaDefinitionUnless(
- cookedList.exists { _.length > 0 },
+ cookedList.length > 0,
"Property dfdl:%s cannot be empty string. Use dfdl:nilValue='%%ES;' for
empty string as nil value.",
Review Comment:
Same issue. Hard coded nilValue in message.
--
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]