Bug Smack-163 [Fix NPE in RoomInfo when subject has not value] not fixed

Hi All,

Have been using Smack to add Jabber Server support to the VASSAL board game engine. Previously, we have used a custom Java server but want to open up and allow users to run their own Jabber servers.

Have run into a number of problems that I am slowly working around, but this issue I cannot fix.

Bug Smack-163 [Fix NPE in RoomInfo when subject has not value]

which relates to an earlier discussion here (http://www.igniterealtime.org/community/message/116119#116119) has been fixed incorrectly. The RoomInfo ctor still fails with an NPE when connecting to an ejabberd server. The fix did not follow the original posters suggested fix, which did work, but tries a different method which does not work against an ejabberd server.

The code was changed from

 this.subject = form.getField("muc#roominfo_subject").getValues().next();

to

 Iterator<String> values = form.getField("muc#roominfo_subject").getValues();
 if (values.hasNext()) {

      this.subject = values.next();

 }
 else {

      this.subject = "";

 }

The correct fix is:

 final FormField subjField = form.getField("muc#roominfo_subject");
 this.subject = subjField == null ? "" : subjField.getValues().next();

I have registered on the bug tracker and annotated the bug. report.

Whats the procedure to get this bug reopened and sorted out?

Regards,

Brent Easton

VASSAL development team.