Group rename error

I just tried to rename a group using the RosterGroup.setName(name) method. When I do this, I get this stack trace:

java.lang.NullPointerException
     at org.jivesoftware.smack.Roster$RosterPacketListener.processPacket(Roster.java:704)
     at org.jivesoftware.smack.PacketReader$ListenerWrapper.notifyListener(PacketReader.java:908)
     at org.jivesoftware.smack.PacketReader.processListeners(PacketReader.java:253)
     at org.jivesoftware.smack.PacketReader.access$1(PacketReader.java:236)
     at org.jivesoftware.smack.PacketReader$2.run(PacketReader.java:111)

Using the debugging window, I see that Smack first sends two (the group has 2 members) packages containing ‘‘name’’ and then another two with ‘’’’. The group now has no name.

When I now try to rename the group again, Smack again sends 4 packages, but I don’'t get a NullPointerException. The name still is empty.

Bart,

I found a problem in RosterGroup.setName that was generating the NullPointerException. You can download the new daily build and test if the problem was resolved.

Regarding the ‘’’’ packet I was only able to reproduce the problem by setting “” as the name of the roster group. I suggest to check if you are setting an empty string as the roster group name.

If you are still have problems please let us know.

Regards,

– Gato

Gato,

I tried the Dec 2 build earlier today and the NullPointerException doesn’'t occur anymore.

The ‘’’’ packet was my own fault indeed. For some reason, I had a setName("") in my code, I can’'t remember why and apparently I forgot to remove that.

Bart