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

Method isSubscribed

app/src/main/java/com/sun/mail/imap/IMAPFolder.java:732–757  ·  view source on GitHub ↗

Check whether this folder is subscribed.

()

Source from the content-addressed store, hash-verified

730 * Check whether this folder is subscribed.
731 */
732 @Override
733 public synchronized boolean isSubscribed() {
734 ListInfo[] li = null;
735 final String lname;
736 if (isNamespace && separator != '\0')
737 lname = fullName + separator;
738 else
739 lname = fullName;
740
741 try {
742 li = (ListInfo[])doProtocolCommand(new ProtocolCommand() {
743 @Override
744 public Object doCommand(IMAPProtocol p)
745 throws ProtocolException {
746 return p.lsub("", lname);
747 }
748 });
749 } catch (ProtocolException pex) {
750 }
751
752 if (li != null) {
753 int i = findName(li, lname);
754 return li[i].canOpen;
755 } else
756 return false;
757 }
758
759 /**
760 * Subscribe/Unsubscribe this folder.

Callers

nothing calls this directly

Calls 2

doProtocolCommandMethod · 0.95
findNameMethod · 0.95

Tested by

no test coverage detected