Skip to content

Commit

Permalink
Use empty string nick on empty element tag
Browse files Browse the repository at this point in the history
It will use an empty string in case of an empty element tag.
  • Loading branch information
UltimateZero authored and Flowdalic committed May 31, 2016
1 parent fefc8cf commit df0f805
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,7 @@ public static class Provider extends ExtensionElementProvider<Nick> {
@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);
}
Expand Down

0 comments on commit df0f805

Please sign in to comment.