pjfanning opened a new pull request, #2015:
URL: https://github.com/apache/pekko-connectors/pull/2015

   ### Motivation
   Malformed XML makes the Aalto parser throw `XMLStreamException` from the 
`StreamingXmlParser` stage handlers. The stream does fail, but the interpreter 
also logs `Error in stage [...]` at ERROR for what is an expected input failure.
   
   ### Modification
   Catch `XMLStreamException` in `onPush`, `onPull` and `onUpstreamFinish` and 
call `failStage` with it, via a small local helper.
   
   This ports [akka/alpakka#3003](https://github.com/akka/alpakka/pull/3003), 
which is Apache licensed. Existing license and copyright headers are unchanged.
   
   ### Result
   Invalid XML fails the stream with the `XMLStreamException` and no stage 
error is logged. The context-aware parser shares this stage, so it is covered 
too.
   
   ### Tests
   - `sbt "xml/Test/testOnly docs.scaladsl.XmlProcessingSpec -- -z \"fail if 
invalid XML\""`: failed before the fix (stage error logged), passes after
   - `sbt xml/test`: 42 passed
   - `sbt xml/mimaReportBinaryIssues`: passed
   - `sbt scalafmtAll`
   
   ### References
   Refs akka/alpakka#3003
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to