Skip to content

Conversation

@ashawley
Copy link
Member

This tries to fix the long-standing defects in ConstructingParser that were shown to cause out of memory exceptions. The original tests contributed by Artem Stasiuk in #32 presumed fixing the methods would make them throw exceptions. I made a more minimal fix: I followed the suggestions of A.P. Marki that not every syntax error is fatal, and that it is better to address the infinite loops in various method than actually terminate processing with an exception. Admittedly, this code is pretty inconsistent with respect to termination. I suggest we take that on later.

To be honest, making further improvements would have consequences in the behavior of XMLEventReader. I decided to not go there. There is a plan to drop XMLEventReader in #200. Given, my most recent experience here, I'd say that's still a good idea.

ashawley added 3 commits June 26, 2018 01:20
Shorten test names and minimize string literals.
Add eof checks to:

- MarkupParser.xEntityValue
- MarkupParser.xComment
- MarkupParser.systemLiteral
- MarkupParser.pubidLiteral
- MarkupParser.notationDecl
- MarkupParserCommon.xAttributeValue
- MarkupParserCommon.xTakeUntil
@ashawley ashawley merged commit db03589 into scala:master Jun 26, 2018
@ashawley ashawley deleted the issue-4520 branch June 26, 2018 12:50
@ashawley ashawley mentioned this pull request Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants