geronimo-mail_2.1/geronimo-mail_2.1_provider/src/main/java/org/apache/geronimo/mail/store/imap/IMAPFolder.java [991:1040]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void fetch(Message[] messages, FetchProfile profile) throws MessagingException {

        // we might already have the information being requested, so ask each of the
        // messages in the list to evaluate itself against the profile.  We'll only ask
        // the server to send information that's required.
        List fetchSet = new ArrayList();

        for (int i = 0; i < messages.length; i++) {
            Message msg = messages[i];
            // the message is missing some of the information still.  Keep this in the list.
            // even if the message is only missing one piece of information, we still fetch everything.
            if (((IMAPMessage)msg).evaluateFetch(profile)) {
                fetchSet.add(msg);
            }
        }

        // we've got everything already, no sense bothering the server
        if (fetchSet.isEmpty()) {
            return;
        }
        // ask the store to kindly hook us up with a connection.
        IMAPConnection connection = getConnection();
        try {
            // ok, from this point onward, we don't want any threads messing with the
            // message cache.  A single processed EXPUNGE could make for a very bad day
            synchronized(this) {
                // get the message set for this
                String messageSet = generateMessageSet(fetchSet);
                // fetch all of the responses
                List responses = connection.fetch(messageSet, profile);

                // IMPORTANT:  We must do our updates while synchronized to keep the
                // cache from getting updated underneath us.   This includes
                // not releasing the connection until we're done to delay processing any
                // pending expunge responses.
                for (int i = 0; i < responses.size(); i++) {
                    IMAPFetchResponse response = (IMAPFetchResponse)responses.get(i);
                    Message msg = getMessage(response.getSequenceNumber());
                    // Belt and Braces.  This should never be false.
                    if (msg != null) {
                        // have the message apply this to itself.
                        ((IMAPMessage)msg).updateMessageInformation(response);
                    }
                }
            }
        } finally {
            releaseConnection(connection);
        }
        return;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.4/geronimo-javamail_1.4_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPFolder.java [1002:1051]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void fetch(Message[] messages, FetchProfile profile) throws MessagingException {

        // we might already have the information being requested, so ask each of the
        // messages in the list to evaluate itself against the profile.  We'll only ask
        // the server to send information that's required.
        List fetchSet = new ArrayList();

        for (int i = 0; i < messages.length; i++) {
            Message msg = messages[i];
            // the message is missing some of the information still.  Keep this in the list.
            // even if the message is only missing one piece of information, we still fetch everything.
            if (((IMAPMessage)msg).evaluateFetch(profile)) {
                fetchSet.add(msg);
            }
        }

        // we've got everything already, no sense bothering the server
        if (fetchSet.isEmpty()) {
            return;
        }
        // ask the store to kindly hook us up with a connection.
        IMAPConnection connection = getConnection();
        try {
            // ok, from this point onward, we don't want any threads messing with the
            // message cache.  A single processed EXPUNGE could make for a very bad day
            synchronized(this) {
                // get the message set for this
                String messageSet = generateMessageSet(fetchSet);
                // fetch all of the responses
                List responses = connection.fetch(messageSet, profile);

                // IMPORTANT:  We must do our updates while synchronized to keep the
                // cache from getting updated underneath us.   This includes
                // not releasing the connection until we're done to delay processing any
                // pending expunge responses.
                for (int i = 0; i < responses.size(); i++) {
                    IMAPFetchResponse response = (IMAPFetchResponse)responses.get(i);
                    Message msg = getMessage(response.getSequenceNumber());
                    // Belt and Braces.  This should never be false.
                    if (msg != null) {
                        // have the message apply this to itself.
                        ((IMAPMessage)msg).updateMessageInformation(response);
                    }
                }
            }
        } finally {
            releaseConnection(connection);
        }
        return;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.5/geronimo-javamail_1.5_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPFolder.java [1002:1051]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void fetch(Message[] messages, FetchProfile profile) throws MessagingException {

        // we might already have the information being requested, so ask each of the
        // messages in the list to evaluate itself against the profile.  We'll only ask
        // the server to send information that's required.
        List fetchSet = new ArrayList();

        for (int i = 0; i < messages.length; i++) {
            Message msg = messages[i];
            // the message is missing some of the information still.  Keep this in the list.
            // even if the message is only missing one piece of information, we still fetch everything.
            if (((IMAPMessage)msg).evaluateFetch(profile)) {
                fetchSet.add(msg);
            }
        }

        // we've got everything already, no sense bothering the server
        if (fetchSet.isEmpty()) {
            return;
        }
        // ask the store to kindly hook us up with a connection.
        IMAPConnection connection = getConnection();
        try {
            // ok, from this point onward, we don't want any threads messing with the
            // message cache.  A single processed EXPUNGE could make for a very bad day
            synchronized(this) {
                // get the message set for this
                String messageSet = generateMessageSet(fetchSet);
                // fetch all of the responses
                List responses = connection.fetch(messageSet, profile);

                // IMPORTANT:  We must do our updates while synchronized to keep the
                // cache from getting updated underneath us.   This includes
                // not releasing the connection until we're done to delay processing any
                // pending expunge responses.
                for (int i = 0; i < responses.size(); i++) {
                    IMAPFetchResponse response = (IMAPFetchResponse)responses.get(i);
                    Message msg = getMessage(response.getSequenceNumber());
                    // Belt and Braces.  This should never be false.
                    if (msg != null) {
                        // have the message apply this to itself.
                        ((IMAPMessage)msg).updateMessageInformation(response);
                    }
                }
            }
        } finally {
            releaseConnection(connection);
        }
        return;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



geronimo-javamail_1.6/geronimo-javamail_1.6_provider/src/main/java/org/apache/geronimo/javamail/store/imap/IMAPFolder.java [993:1042]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void fetch(Message[] messages, FetchProfile profile) throws MessagingException {

        // we might already have the information being requested, so ask each of the
        // messages in the list to evaluate itself against the profile.  We'll only ask
        // the server to send information that's required.
        List fetchSet = new ArrayList();

        for (int i = 0; i < messages.length; i++) {
            Message msg = messages[i];
            // the message is missing some of the information still.  Keep this in the list.
            // even if the message is only missing one piece of information, we still fetch everything.
            if (((IMAPMessage)msg).evaluateFetch(profile)) {
                fetchSet.add(msg);
            }
        }

        // we've got everything already, no sense bothering the server
        if (fetchSet.isEmpty()) {
            return;
        }
        // ask the store to kindly hook us up with a connection.
        IMAPConnection connection = getConnection();
        try {
            // ok, from this point onward, we don't want any threads messing with the
            // message cache.  A single processed EXPUNGE could make for a very bad day
            synchronized(this) {
                // get the message set for this
                String messageSet = generateMessageSet(fetchSet);
                // fetch all of the responses
                List responses = connection.fetch(messageSet, profile);

                // IMPORTANT:  We must do our updates while synchronized to keep the
                // cache from getting updated underneath us.   This includes
                // not releasing the connection until we're done to delay processing any
                // pending expunge responses.
                for (int i = 0; i < responses.size(); i++) {
                    IMAPFetchResponse response = (IMAPFetchResponse)responses.get(i);
                    Message msg = getMessage(response.getSequenceNumber());
                    // Belt and Braces.  This should never be false.
                    if (msg != null) {
                        // have the message apply this to itself.
                        ((IMAPMessage)msg).updateMessageInformation(response);
                    }
                }
            }
        } finally {
            releaseConnection(connection);
        }
        return;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



