summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMili Verma <mili.verma@isode.com>2012-02-23 17:38:30 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-23 17:39:04 (GMT)
commit9adba9899fcf98db402e279970056f7a2ada7915 (patch)
treeeaf83641bb78b23c0c16331944afbd000c0d2949 /src
parentc80110013f16d8aa4e6e9801e01ce9ccab1e6592 (diff)
downloadstroke-9adba9899fcf98db402e279970056f7a2ada7915.zip
stroke-9adba9899fcf98db402e279970056f7a2ada7915.tar.bz2
Fix Stroke to allow empty values
This patch gives a fix to a client of Stroke can send emtpty values in form fields. Test-information: Tests pass. Before patch, MLC is not able to send empty values in updates. After the patch, it is.
Diffstat (limited to 'src')
-rw-r--r--src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java b/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java
index c2a2189..9ab5e37 100644
--- a/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java
+++ b/src/com/isode/stroke/serializer/payloadserializers/FormSerializer.java
@@ -191,12 +191,12 @@ public class FormSerializer extends GenericPayloadSerializer<Form> {
private static void serializeValueAsString(GenericFormField<String> field,
XMLElement parent) {
String value = field.getValue();
- if (!value.isEmpty()) {
+ // FIXME with the proper fix after Swiften is fixed: if (!value.isEmpty()) {
XMLElement valueElement = new XMLElement(
FormField.FORM_FIELD_ELEMENT_VALUE);
valueElement.addNode(XMLTextNode.create(value));
parent.addNode(valueElement);
- }
+ // }
}
@Override