try { while (enum.hasMoreElements()) { tmpUser = (User)enum.nextElement(); tmpClientServant = tmpUser.getClientServant(); if (tmpClientServant != null) { tmpClientServant.sendMsgFromChannel(oldUser.getName(), msg); }
while (enum.hasMoreElements()) { tmpUser = (User)enum.nextElement(); tmpClientServant = tmpUser.getClientServant(); if (tmpClientServant != null) { tmpClientServant.sendMsgFromChannel(oldUser.getName(), msg);
    public final void sendMsgToChannel(String msg) {        User oldUser = this.user;        if (oldUser != null) {            Channel oldChannel = oldUser.getCurrentChannel();            if (oldChannel != null) {                Enumeration enum = oldChannel.getCurrentUserEnum();                User tmpUser;                ClientServant tmpClientServant;                try {                    while (enum.hasMoreElements()) {                        tmpUser = (User)enum.nextElement();                        tmpClientServant = tmpUser.getClientServant();                        if (tmpClientServant != null) {                            tmpClientServant.sendMsgFromChannel(oldUser.getName(), msg);                        }                    }                }                catch (java.util.NoSuchElementException e) {                    Debug.println(Debug.HIGH, this + " " + " error while sendMsgToChannel " + e);                }            }