Synchronize MultiUserchat.changeNickname(Resourcepart)

This commit is contained in:
Florian Schmaus 2015-04-23 21:45:33 +02:00
parent 00a7556bfe
commit 5af4f1a5d1
1 changed files with 1 additions and 1 deletions

View File

@ -969,7 +969,7 @@ public class MultiUserChat {
* @throws InterruptedException
* @throws MucNotJoinedException
*/
public void changeNickname(Resourcepart nickname) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, MucNotJoinedException {
public synchronized void changeNickname(Resourcepart nickname) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, MucNotJoinedException {
StringUtils.requireNotNullOrEmpty(nickname, "Nickname must not be null or blank.");
// Check that we already have joined the room before attempting to change the
// nickname.