tuxji commented on code in PR #821:
URL: https://github.com/apache/daffodil/pull/821#discussion_r1038509009
##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/infoset/XMLTextInfosetOutputter.scala:
##########
@@ -156,8 +158,11 @@ class XMLTextInfosetOutputter private (writer:
java.io.Writer, pretty: Boolean)
if (!isNilled(simple) && simple.hasValue) {
if (simple.erd.optPrimType.get == NodeInfo.String) {
- val simpleVal = simple.dataValueAsString
- if (simple.erd.runtimeProperties.get(XMLTextInfoset.stringAsXml) ==
"true") {
+ var simpleVal = simple.dataValueAsString
+ if (xmlOutputStyle == XMLOutputStyle.PrettyPrintSafe){
Review Comment:
This code block look better to me as well. Even better, the match
expression will be guaranteed to throw a NoMatchException if the Java compiler
lets a Java caller pass null into xmlOutputStyle.
--
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]