if (rsp_list.size() > 1) { if (log.isWarnEnabled()) { log.warn("response list contains " + "more that 1 response; returning first response !"); }
if(rsp_list.size() > 1) { if(log.isWarnEnabled()) log.warn("response list contains more that 1 response; returning first response !");
    public Object sendMessage(Message msg, int mode, long timeout) throws TimeoutException, SuspectedException {        Vector mbrs = new Vector();        RspList rsp_list = null;        Object dest = msg.getDest();        Rsp rsp;        GroupRequest _req = null;        if (dest == null) {            if (log.isErrorEnabled()) {                log.error("the message's destination is null, " +                          "cannot send message");            }            return null;        }        mbrs.addElement(dest);   // dummy membership (of destination address)        _req = new GroupRequest(msg, corr, mbrs, mode, timeout, 0);        _req.execute();        if (mode == GroupRequest.GET_NONE) {            return null;        }        rsp_list = _req.getResults();        if (rsp_list.size() == 0) {            if (log.isWarnEnabled()) {                log.warn(" response list is empty");            }            return null;        }        if (rsp_list.size() > 1) {            if (log.isWarnEnabled()) {                log.warn("response list contains " +                         "more that 1 response; returning first response !");            }        }        rsp = (Rsp) rsp_list.elementAt(0);        if (rsp.wasSuspected()) {            throw new SuspectedException(dest);        }        if (!rsp.wasReceived()) {            throw new TimeoutException();        }        return rsp.getValue();    }