Roster.getGroups returning 0

Hello everyone

When I found that the use of smack4.1.1 to directly call Roster.getGroups will be an empty set



Through debug can find openfire is indeed a return message

And if I use the Roster.getGroups method before using the Roster.reloadAndWait method to get the result will be normal

This is why

Loading the roster is an asynchronous task. It is triggered when getInstanceFor() is called, but may not be finished when it’s returned.

I plan to change that behavior in Smack 4.2, so that the new roster returned by getInstanceFor() is loaded if the connection was authenticated: SMACK-663

I want to modify the smack source code, asynchronous will rewrite the synchronous way, can you tell me where you revised