private void checkJoinRoomPreconditionNicknameReserved(@Nonnull final JID realAddress, @Nonnull final String nickname ) throws ConflictException
    {
        final JID bareJID = realAddress.asBareJID();
        final JID bareMemberJid = getMemberForReservedNickname(nickname);
        final boolean canJoin = bareMemberJid == null || bareMemberJid.equals(bareJID);
        Log.trace( "{} Room join precondition 'nickname reserved': User '{}' {} join room '{}'.", canJoin ? "PASS" : "FAIL", realAddress, canJoin ? "can" : "cannot", this.getJID() );
        if (!canJoin) {
            throw new ConflictException( "Someone else in the room has reserved the nickname that you want to use." );
        }
    }
Checks if the nickname that the user attempts to use has been reserved by a(nother) member of the room.

@param realAddress The address of the user that attempts to join.
@param nickname The nickname that the user is attempting to use
@throws ConflictException when joining is prevented by virtue of someone else in the room having reserved the nickname.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java