1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-29 17:52: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:
rcollier 2011-12-21 14:58:48 +00:00
parent c60184f852
commit 62ce8e85dd

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()