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

Method loadFlags

app/src/main/java/com/sun/mail/imap/IMAPMessage.java:1645–1669  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1643 * Load this message's Flags
1644 */
1645 private synchronized void loadFlags() throws MessagingException {
1646 if (flags != null)
1647 return;
1648
1649 // Acquire MessageCacheLock, to freeze seqnum.
1650 synchronized(getMessageCacheLock()) {
1651 try {
1652 IMAPProtocol p = getProtocol();
1653
1654 // This message could be expunged when we were waiting
1655 // to acquire the lock ...
1656 checkExpunged();
1657
1658 flags = p.fetchFlags(getSequenceNumber());
1659 // make sure flags is always set, even if server is broken
1660 if (flags == null)
1661 flags = new Flags();
1662 } catch (ConnectionException cex) {
1663 throw new FolderClosedException(folder, cex.getMessage());
1664 } catch (ProtocolException pex) {
1665 forceCheckExpunged();
1666 throw new MessagingException(pex.getMessage(), pex);
1667 }
1668 } // Release MessageCacheLock
1669 }
1670
1671 /*
1672 * Are all headers loaded?

Callers 2

getFlagsMethod · 0.95
isSetMethod · 0.95

Calls 7

getMessageCacheLockMethod · 0.95
getProtocolMethod · 0.95
checkExpungedMethod · 0.95
fetchFlagsMethod · 0.95
getSequenceNumberMethod · 0.95
forceCheckExpungedMethod · 0.95
getMessageMethod · 0.65

Tested by

no test coverage detected