Issue reporting, concerning #SMACK-312 and RosterEntry.setName

Hi folks,

nice to see Smack active again.

When renaming roster entries, updated RosterEntries did not fire an updated-event, what could be traced back to two issues:

  1. RosterEntry.setName

This method sets the name for the current object X and sends out the RosterPacket for it.

When then there is a Roster-reply, the incoming RosterEntry for X does not trigger an update, because both (oldEntry & newEntry) are equalDeep (having the same name already).

  1. Roster.RosterPacketListener, (concerning Issue item #SMACK-312)

When RosterEntries are coming in for a User already in the the entries-Map, the RosterEntry is always replaced with the new object.

But only if the new and old RosterEntry object differ (equalsDeep(x)==false), the roster listeners are informed with an update-event. Otherwise the roster using classes may work with orphaned RosterEntry objects.

I attached a patch that should fix these issues as I understand it is supposed to work.

These issues exist in Smack 3.1 and 3.2 Beta 2.

The patch is based on Smack v3.2 revision 12145

Greetings,

Björn
smack32_updating_RosterEntry_name.diff.zip (866 Bytes)

Bumping this patch with an updated diff for Smack version 3.2.1

This patch fixes renaming roster entries for correctly notifying listeners on changed name.

For the details, please see the previous post.
smack321_updating_RosterEntry_name.zip (904 Bytes)

I reopened SMACK-312 and added your new patch.