mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
Fix IndexOutOfBoundsException in FormField.getFirstValue()
Fixes SMACK-838.
This commit is contained in:
parent
89c9a41863
commit
ec982f65e2
1 changed files with 5 additions and 3 deletions
|
@ -261,12 +261,14 @@ public class FormField implements NamedElement {
|
||||||
*/
|
*/
|
||||||
public String getFirstValue() {
|
public String getFirstValue() {
|
||||||
CharSequence firstValue;
|
CharSequence firstValue;
|
||||||
|
|
||||||
synchronized (values) {
|
synchronized (values) {
|
||||||
firstValue = values.get(0);
|
if (values.isEmpty()) {
|
||||||
}
|
|
||||||
if (firstValue == null) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
firstValue = values.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
return firstValue.toString();
|
return firstValue.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue