1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

Minor refactoring in DataForm.hasHiddenFormTypeField()

This commit is contained in:
Florian Schmaus 2014-12-28 00:14:16 +01:00
parent 55a967da93
commit 364fe12b38

View file

@ -213,14 +213,12 @@ public class DataForm implements PacketExtension {
* @return true if there is at least one field which is hidden.
*/
public boolean hasHiddenFormTypeField() {
boolean found = false;
for (FormField f : fields) {
if (f.getVariable().equals("FORM_TYPE") && f.getType() == FormField.Type.hidden) {
found = true;
break;
return true;
}
}
return found;
return false;
}
@Override