From 55299fb7e7c4e3636beba180868cab62f5e06cfe Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 13 Sep 2021 10:10:55 +0200 Subject: [PATCH] [core] Assert that 'event' is not END_DOCUMENT in forwardToEndTagOfDepth() --- .../src/main/java/org/jivesoftware/smack/util/ParserUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java index 8f67c5ccf..be526aaba 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java @@ -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(); } }