public void addOccupant(@Nonnull final MUCOccupant occupant)
    {
        if (occupants.contains(occupant)) {
            // Ignore a data consistency problem. This indicates that a bug exists somewhere, so log it verbosely.
            Log.warn("Not re-adding an occupant {} that already exists in room {}!", occupant, this.getJID(), new IllegalStateException("Duplicate occupant: " + occupant));
            return;
        }

        Log.trace( "Add occupant to room {}: {}", this.getJID(), occupant);
        occupants.add(occupant);

        // Fire event that occupant joined the room.
        MUCEventDispatcher.occupantJoined(occupant.getOccupantJID().asBareJID(), occupant.getUserAddress(), occupant.getNickname());
    }
Adds an occupant to all the internal occupants collections.

@param occupant the occupant to add.
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java