1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 10:37:59 +01:00

Use empty string nick on empty element tag

It will use an empty string in case of an empty element tag.
This commit is contained in:
UltimateZero 2016-05-15 18:41:57 +02:00 committed by Florian Schmaus
parent fefc8cf332
commit df0f805feb

View file

@ -99,14 +99,7 @@ public class Nick implements ExtensionElement {
@Override
public Nick parse(XmlPullParser parser, int initialDepth)
throws XmlPullParserException, IOException {
parser.next();
final String name = parser.getText();
// Advance to end of extension.
while(parser.getEventType() != XmlPullParser.END_TAG) {
parser.next();
}
final String name = parser.nextText();
return new Nick(name);
}