diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-04-19 13:31:52 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-04-19 13:31:52 (GMT) |
commit | a7556f33a88aa622460d1f05f8869b88cb23ca93 (patch) | |
tree | 6979209aa4efe12b188f37a6811d5ee0a95603b4 /src/com | |
parent | d9d9451156ee8a4315de30571131d114af205fa1 (diff) | |
download | stroke-a7556f33a88aa622460d1f05f8869b88cb23ca93.zip stroke-a7556f33a88aa622460d1f05f8869b88cb23ca93.tar.bz2 |
Update parsing factories to allow empty namespaces, in line with Swiften
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/isode/stroke/parser/GenericPayloadParserFactory.java | 2 |
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() { |