public List<MUCOccupant> getOccupantsByBareJID(@Nonnull final JID userAddress) throws UserNotFoundException
    {
        final List<MUCOccupant> filteredOccupants = occupants.stream()
            .filter(occupant -> occupant.getUserAddress().asBareJID().equals(userAddress.asBareJID()))
            .collect(Collectors.toList());

        if (filteredOccupants.isEmpty()) {
            throw new UserNotFoundException();
        }

        return Collections.unmodifiableList(filteredOccupants);
    }
Obtain the roles of a given user in the room by his bare JID. A user can have several roles,
one for each client resource from which the user has joined the room.

@param userAddress The (real) JID of the user you'd like to obtain.
@return The user's roles in the room
@throws UserNotFoundException If there is no user with the given nickname
xmppserver/src/main/java/org/jivesoftware/openfire/muc/MUCRoom.java