Minor refactoring in DataForm.hasHiddenFormTypeField()

This commit is contained in:
Florian Schmaus 2014-12-28 00:14:16 +01:00
parent 55a967da93
commit 364fe12b38
1 changed files with 2 additions and 4 deletions

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