From fa71ff96054ec761a6d79e2f6230749effd99d6a Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 27 Mar 2014 10:38:35 +0100 Subject: [PATCH] Fixed NPE in FromMatchesFilter in cases where a 'null' FromMatchesFilter was used and the processed message would have a non-null 'from' attribute. Thanks to sylvia for reporting this. --- .../java/org/jivesoftware/smack/filter/FromMatchesFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java b/core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java index 6c98ff4de..1101243f7 100644 --- a/core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java +++ b/core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java @@ -94,7 +94,7 @@ public class FromMatchesFilter implements PacketFilter { if (matchBareJID) { from = StringUtils.parseBareAddress(from).toLowerCase(); } - return address.equals(from); + return from.equals(address); } public String toString() {