mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-30 02:02:06 +01:00
SMACK-362 Added check for no values on form.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_2_0@12926 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
c60184f852
commit
62ce8e85dd
1 changed files with 2 additions and 2 deletions
|
@ -90,10 +90,10 @@ public class RoomInfo {
|
||||||
Form form = Form.getFormFrom(info);
|
Form form = Form.getFormFrom(info);
|
||||||
if (form != null) {
|
if (form != null) {
|
||||||
FormField descField = form.getField("muc#roominfo_description");
|
FormField descField = form.getField("muc#roominfo_description");
|
||||||
this.description = descField == null ? "" : descField.getValues().next();
|
this.description = ( descField == null || !(descField.getValues().hasNext()) )? "" : descField.getValues().next();
|
||||||
|
|
||||||
FormField subjField = form.getField("muc#roominfo_subject");
|
FormField subjField = form.getField("muc#roominfo_subject");
|
||||||
this.subject = subjField == null ? "" : subjField.getValues().next();
|
this.subject = ( subjField == null || !(subjField.getValues().hasNext()) ) ? "" : subjField.getValues().next();
|
||||||
|
|
||||||
FormField occCountField = form.getField("muc#roominfo_occupants");
|
FormField occCountField = form.getField("muc#roominfo_occupants");
|
||||||
this.occupantsCount = occCountField == null ? -1 : Integer.parseInt(occCountField.getValues()
|
this.occupantsCount = occCountField == null ? -1 : Integer.parseInt(occCountField.getValues()
|
||||||
|
|
Loading…
Reference in a new issue