mike-mcgann commented on code in PR #985:
URL: https://github.com/apache/daffodil/pull/985#discussion_r1132489712


##########
daffodil-test/src/test/scala/org/apache/daffodil/section00/general/TestDisallowDocType.scala:
##########
@@ -87,7 +86,7 @@ class TestDisallowDocType {
   }
 
   @Test def test_infosetFileMustNotHaveDocType(): Unit = {
-    val e = intercept[TDMLException] {
+    val e = intercept[SAXParseException] {

Review Comment:
   I found the root cause of the issue. Daffodil was working fine. It is a bug 
in scala-xml. In this specific case, the infinite loop is caused when the 
scanner does not advance when this error is reported. There is evidence of 
error correction elsewhere so I think this was simply overlooked. My proposed 
solution is to now only throw an exception when that specific error is raised. 
Yes, looking at the error message is a bit hackish, but I'm thinking that it is 
a good compromise where it can continue as much as possible without causing the 
infinite loop. We have a test now and if the message changes, it should be 
caught. 



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