From 18a958e442caaf17c82d4d22b151ceedd33595c4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Fri, 15 Aug 2014 23:22:59 +0200 Subject: [PATCH] Fix faulty string comparison in SubscriptionProvider '!=' tests for reference inequality, must use '!String.equals(String)' instead. --- .../smackx/pubsub/provider/SubscriptionProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/provider/SubscriptionProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/provider/SubscriptionProvider.java index eff761389..f521e0577 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/provider/SubscriptionProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/provider/SubscriptionProvider.java @@ -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);