1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-06-29 06:54:52 +02: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. * @return true if there is at least one field which is hidden.
*/ */
public boolean hasHiddenFormTypeField() { public boolean hasHiddenFormTypeField() {
boolean found = false;
for (FormField f : fields) { for (FormField f : fields) {
if (f.getVariable().equals("FORM_TYPE") && f.getType() == FormField.Type.hidden) { if (f.getVariable().equals("FORM_TYPE") && f.getType() == FormField.Type.hidden) {
found = true; return true;
break;
} }
} }
return found; return false;
} }
@Override @Override