RosterEntry#getGroups throws an NullPointerException at line 117


Im using RosterEntry and RosterGroup in JTree model to present the status of the users list. After closing the connection I get the following exception:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.jivesoftware.smack.RosterEntry.getGroups(
        at org.jivesoftware.smack.RosterEntry.toString(
        at javax.swing.JTree.convertValueToText(
        at javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent(

I think that would do well to check for null’s before:

117:     for (RosterGroup group : this.connection.roster.getGroups()) {

Am I right, or should I rather look for bugs in my own code?

EDIT: Smack 3.1.0

This code has already been changed. Try a nightly build to see if you still have tihis problem.

I have used nightly build of Smack 3.2.0 Beta2. Now its seems to be ok. Thanks.