summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-04-19 13:31:52 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-04-19 13:31:52 (GMT)
commita7556f33a88aa622460d1f05f8869b88cb23ca93 (patch)
tree6979209aa4efe12b188f37a6811d5ee0a95603b4
parentd9d9451156ee8a4315de30571131d114af205fa1 (diff)
downloadstroke-a7556f33a88aa622460d1f05f8869b88cb23ca93.zip
stroke-a7556f33a88aa622460d1f05f8869b88cb23ca93.tar.bz2
Update parsing factories to allow empty namespaces, in line with Swiften
-rw-r--r--src/com/isode/stroke/parser/GenericPayloadParserFactory.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/isode/stroke/parser/GenericPayloadParserFactory.java b/src/com/isode/stroke/parser/GenericPayloadParserFactory.java
index c9b258c..76f3fda 100644
--- a/src/com/isode/stroke/parser/GenericPayloadParserFactory.java
+++ b/src/com/isode/stroke/parser/GenericPayloadParserFactory.java
@@ -25,7 +25,7 @@ public class GenericPayloadParserFactory<T extends PayloadParser> implements Pay
}
public boolean canParse(final String element, final String ns, final AttributeMap attributes) {
- return element.equals(tag_) && xmlns_.equals(ns);
+ return (tag_.isEmpty() ? true : tag_.equals(element)) && (xmlns_.isEmpty() ? true : xmlns_.equals(ns));
}
public final PayloadParser createPayloadParser() {