Bug in Occupant.java Smack 3.0.4?

I recently updated to Smack 3.0.4. We were keeping occupants in a DefaultListModel and then using a custom renderer to show the occupant. The code had null pointer exceptions after the update, and it turned out the Occupant class was blowing up on line 117 in the hasCode method jid.hashCode()

It looks like it just needs to do similar checking like the “nick” test.

public int hashCode() {

int result;

result = affiliation.hashCode();

result = 17 * result + role.hashCode();

result = 17 * result + jid.hashCode();

result = 17 * result + (nick != null ? nick.hashCode() : 0);

return result;

}