summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/isode/stroke/parser/payloadparsers/FormParserFactory.java')
-rw-r--r--src/com/isode/stroke/parser/payloadparsers/FormParserFactory.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/isode/stroke/parser/payloadparsers/FormParserFactory.java b/src/com/isode/stroke/parser/payloadparsers/FormParserFactory.java
index 228c093..0287cca 100644
--- a/src/com/isode/stroke/parser/payloadparsers/FormParserFactory.java
+++ b/src/com/isode/stroke/parser/payloadparsers/FormParserFactory.java
@@ -24,7 +24,18 @@ public class FormParserFactory implements PayloadParserFactory {
public FormParserFactory() {
}
- public boolean canParse(String element, String ns, AttributeMap attributes) {
+ public boolean canParse(String element, String ns,
+ final AttributeMap attributes) {
+ if (element == null) {
+ throw new NullPointerException("'element' must not be null");
+ }
+ if (ns == null) {
+ throw new NullPointerException("'ns' must not be null");
+ }
+ if (attributes == null) {
+ throw new NullPointerException("'attributes' must not be null");
+ }
+
return ns.equals("jabber:x:data");
}