1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-24 03:27:59 +01:00

Fix faulty string comparison in SubscriptionProvider

'!=' tests for reference inequality, must use '!String.equals(String)'
instead.
This commit is contained in:
Florian Schmaus 2014-08-15 23:22:59 +02:00
parent 7277eb553a
commit 18a958e442

View file

@ -46,7 +46,7 @@ public class SubscriptionProvider implements PacketExtensionProvider
if ((tag == XmlPullParser.START_TAG) && parser.getName().equals("required"))
isRequired = true;
while (tag != XmlPullParser.END_TAG && parser.getName() != "subscribe-options") tag = parser.next();
while (tag != XmlPullParser.END_TAG && !parser.getName().equals("subscribe-options")) tag = parser.next();
}
while (parser.getEventType() != XmlPullParser.END_TAG) parser.next();
return new Subscription(jid, nodeId, subId, (state == null ? null : Subscription.State.valueOf(state)), isRequired);