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

Slightly improve PacketParserUtils.parseSessionFeature()

This commit is contained in:
Florian Schmaus 2018-05-09 17:00:09 +02:00
parent 49417d2e20
commit 0df7734efc

View file

@ -954,7 +954,10 @@ public class PacketParserUtils {
ParserUtils.assertAtStartTag(parser); ParserUtils.assertAtStartTag(parser);
final int initialDepth = parser.getDepth(); final int initialDepth = parser.getDepth();
boolean optional = false; boolean optional = false;
if (!parser.isEmptyElementTag()) { if (parser.isEmptyElementTag()) {
return new Session.Feature(optional);
}
outerloop: while (true) { outerloop: while (true) {
int event = parser.next(); int event = parser.next();
switch (event) { switch (event) {
@ -972,9 +975,8 @@ public class PacketParserUtils {
} }
} }
} }
}
return new Session.Feature(optional);
return new Session.Feature(optional);
} }
public static void addExtensionElement(Stanza packet, XmlPullParser parser) public static void addExtensionElement(Stanza packet, XmlPullParser parser)