/** * Get the message objects for the given sequence numbers. * * ASSERT: This method must be called only when holding the * messageCacheLock * * @param seqnums the array of message sequence numbers * @return the IMAPMessage objects * @since JavaMail 1.5.3 */ protected IMAPMessage[] getMessagesBySeqNumbers(int[] seqnums) { IMAPMessage[] msgs = new IMAPMessage[seqnums.length]; int nulls = 0; // Map seq-numbers into actual Messages. for (int i = 0; i < seqnums.length; i++) { msgs[i] = getMessageBySeqNumber(seqnums[i]); if (msgs[i] == null) nulls++; } if (nulls > 0) { // compress the array to remove the nulls IMAPMessage[] nmsgs = new IMAPMessage[seqnums.length - nulls]; for (int i = 0, j = 0; i < msgs.length; i++) { if (msgs[i] != null) nmsgs[j++] = msgs[i]; } msgs = nmsgs; } return msgs; }
/** * Get the message objects for the given sequence numbers. * * ASSERT: This method must be called only when holding the * messageCacheLock * * @param seqnums the array of message sequence numbers * @return the IMAPMessage objects * @since JavaMail 1.5.3 */ protected IMAPMessage[] getMessagesBySeqNumbers(int[] seqnums) { IMAPMessage[] msgs = new IMAPMessage[seqnums.length]; int nulls = 0; // Map seq-numbers into actual Messages. for (int i = 0; i < seqnums.length; i++) { msgs[i] = getMessageBySeqNumber(seqnums[i]); if (msgs[i] == null) nulls++; } if (nulls > 0) { // compress the array to remove the nulls IMAPMessage[] nmsgs = new IMAPMessage[seqnums.length - nulls]; for (int i = 0, j = 0; i < msgs.length; i++) { if (msgs[i] != null) nmsgs[j++] = msgs[i]; } msgs = nmsgs; } return msgs; }
IMAPMessage msg = getMessageBySeqNumber(fr.getNumber()); if (msg != null) { // should always be true boolean notify = false;
IMAPMessage msg = getMessageBySeqNumber(fr.getNumber()); if (msg != null) { // should always be true boolean notify = false;
IMAPMessage msg = getMessageBySeqNumber(f.getNumber());
IMAPMessage msg = getMessageBySeqNumber(f.getNumber());
/** * Get the message objects for the given sequence numbers. * * ASSERT: This method must be called only when holding the * messageCacheLock * * @param seqnums the array of message sequence numbers * @return the IMAPMessage objects * @since JavaMail 1.5.3 */ protected IMAPMessage[] getMessagesBySeqNumbers(int[] seqnums) { IMAPMessage[] msgs = new IMAPMessage[seqnums.length]; int nulls = 0; // Map seq-numbers into actual Messages. for (int i = 0; i < seqnums.length; i++) { msgs[i] = getMessageBySeqNumber(seqnums[i]); if (msgs[i] == null) nulls++; } if (nulls > 0) { // compress the array to remove the nulls IMAPMessage[] nmsgs = new IMAPMessage[seqnums.length - nulls]; for (int i = 0, j = 0; i < msgs.length; i++) { if (msgs[i] != null) nmsgs[j++] = msgs[i]; } msgs = nmsgs; } return msgs; }
/** * Get the message objects for the given sequence numbers. * * ASSERT: This method must be called only when holding the * messageCacheLock * * @param seqnums the array of message sequence numbers * @return the IMAPMessage objects * @since JavaMail 1.5.3 */ protected IMAPMessage[] getMessagesBySeqNumbers(int[] seqnums) { IMAPMessage[] msgs = new IMAPMessage[seqnums.length]; int nulls = 0; // Map seq-numbers into actual Messages. for (int i = 0; i < seqnums.length; i++) { msgs[i] = getMessageBySeqNumber(seqnums[i]); if (msgs[i] == null) nulls++; } if (nulls > 0) { // compress the array to remove the nulls IMAPMessage[] nmsgs = new IMAPMessage[seqnums.length - nulls]; for (int i = 0, j = 0; i < msgs.length; i++) { if (msgs[i] != null) nmsgs[j++] = msgs[i]; } msgs = nmsgs; } return msgs; }
/** * Get the message objects for the given sequence numbers. * * ASSERT: This method must be called only when holding the * messageCacheLock * * @param seqnums the array of message sequence numbers * @return the IMAPMessage objects * @since JavaMail 1.5.3 */ protected IMAPMessage[] getMessagesBySeqNumbers(int[] seqnums) { IMAPMessage[] msgs = new IMAPMessage[seqnums.length]; int nulls = 0; // Map seq-numbers into actual Messages. for (int i = 0; i < seqnums.length; i++) { msgs[i] = getMessageBySeqNumber(seqnums[i]); if (msgs[i] == null) nulls++; } if (nulls > 0) { // compress the array to remove the nulls IMAPMessage[] nmsgs = new IMAPMessage[seqnums.length - nulls]; for (int i = 0, j = 0; i < msgs.length; i++) { if (msgs[i] != null) nmsgs[j++] = msgs[i]; } msgs = nmsgs; } return msgs; }
/** * Get the message objects for the given sequence numbers. * * ASSERT: This method must be called only when holding the * messageCacheLock * * @param seqnums the array of message sequence numbers * @return the IMAPMessage objects * @since JavaMail 1.5.3 */ protected IMAPMessage[] getMessagesBySeqNumbers(int[] seqnums) { IMAPMessage[] msgs = new IMAPMessage[seqnums.length]; int nulls = 0; // Map seq-numbers into actual Messages. for (int i = 0; i < seqnums.length; i++) { msgs[i] = getMessageBySeqNumber(seqnums[i]); if (msgs[i] == null) nulls++; } if (nulls > 0) { // compress the array to remove the nulls IMAPMessage[] nmsgs = new IMAPMessage[seqnums.length - nulls]; for (int i = 0, j = 0; i < msgs.length; i++) { if (msgs[i] != null) nmsgs[j++] = msgs[i]; } msgs = nmsgs; } return msgs; }
msgs = new Message[] { getMessageBySeqNumber(seqnum) }; if (msgs[0] == null) // XXX - should never happen msgs = null;
msgs = new Message[] { getMessageBySeqNumber(seqnum) }; if (msgs[0] == null) // XXX - should never happen msgs = null;
m = getMessageBySeqNumber(u.seqnum);
m = getMessageBySeqNumber(ua[i].seqnum); m.setUID(ua[i].uid); msgs[i] = m;
m = getMessageBySeqNumber(ua[i].seqnum); m.setUID(ua[i].uid); msgs[i] = m;
matchMsgs[i] = getMessageBySeqNumber(matches[i]);
matchMsgs[i] = getMessageBySeqNumber(matches[i]);
matchMsgs = new IMAPMessage[matches.length]; for (int i = 0; i < matches.length; i++) matchMsgs[i] = getMessageBySeqNumber(matches[i]);
matchMsgs = new IMAPMessage[matches.length]; for (int i = 0; i < matches.length; i++) matchMsgs[i] = getMessageBySeqNumber(matches[i]);