MCPcopy Create free account
hub / github.com/M66B/FairEmail / msgnumOf

Method msgnumOf

app/src/main/java/com/sun/mail/imap/MessageCache.java:437–452  ·  view source on GitHub ↗

Return the message number for the given sequence number.

(int seqnum)

Source from the content-addressed store, hash-verified

435 * Return the message number for the given sequence number.
436 */
437 private int msgnumOf(int seqnum) {
438 if (seqnums == null)
439 return seqnum;
440 if (seqnum < 1) { // should never happen
441 if (logger.isLoggable(Level.FINE))
442 logger.fine("bad seqnum " + seqnum);
443 return -1;
444 }
445 for (int msgnum = seqnum; msgnum <= size; msgnum++) {
446 if (seqnums[msgnum-1] == seqnum)
447 return msgnum;
448 if (seqnums[msgnum-1] > seqnum)
449 break; // message doesn't exist
450 }
451 return -1;
452 }
453}

Callers 2

getMessageBySeqnumMethod · 0.95
expungeMessageMethod · 0.95

Calls 2

fineMethod · 0.80
isLoggableMethod · 0.45

Tested by

no test coverage detected