1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

Merge pull request #491 from Flowdalic/assert-not-end-document

[core] Assert that 'event' is not END_DOCUMENT in forwardToEndTagOfDepth()
This commit is contained in:
Florian Schmaus 2021-10-19 14:08:16 +02:00 committed by GitHub
commit d25bd811dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,7 @@ public class ParserUtils {
throws XmlPullParserException, IOException {
XmlPullParser.Event event = parser.getEventType();
while (!(event == XmlPullParser.Event.END_ELEMENT && parser.getDepth() == depth)) {
assert event != XmlPullParser.Event.END_DOCUMENT;
event = parser.next();
}
}