mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Added check for missing field type for multi list in data forms.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13430 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
457959bc88
commit
f0cd048635
1 changed files with 5 additions and 4 deletions
|
@ -20,15 +20,15 @@
|
|||
|
||||
package org.jivesoftware.smackx;
|
||||
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
|
||||
/**
|
||||
* Represents a Form for gathering data. The form could be of the following types:
|
||||
* <ul>
|
||||
|
@ -308,6 +308,7 @@ public class Form {
|
|||
if (!FormField.TYPE_JID_MULTI.equals(field.getType())
|
||||
&& !FormField.TYPE_LIST_MULTI.equals(field.getType())
|
||||
&& !FormField.TYPE_LIST_SINGLE.equals(field.getType())
|
||||
&& !FormField.TYPE_TEXT_MULTI.equals(field.getType())
|
||||
&& !FormField.TYPE_HIDDEN.equals(field.getType())) {
|
||||
throw new IllegalArgumentException("This field only accept list of values.");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue