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:
rcollier 2011-12-21 14:58:48 +00:00
parent c60184f852
commit 62ce8e85dd
1 changed files with 2 additions and 2 deletions

View File

@ -90,10 +90,10 @@ public class RoomInfo {
Form form = Form.getFormFrom(info);
if (form != null) {
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");
this.subject = subjField == null ? "" : subjField.getValues().next();
this.subject = ( subjField == null || !(subjField.getValues().hasNext()) ) ? "" : subjField.getValues().next();
FormField occCountField = form.getField("muc#roominfo_occupants");
this.occupantsCount = occCountField == null ? -1 : Integer.parseInt(occCountField.getValues()