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

Method getUID

app/src/main/java/com/sun/mail/pop3/POP3Folder.java:453–470  ·  view source on GitHub ↗

Return the unique ID string for this message, or null if not available. Uses the POP3 UIDL command. @param msg the message @return unique ID string @exception MessagingException for failures

(Message msg)

Source from the content-addressed store, hash-verified

451 * @exception MessagingException for failures
452 */
453 public synchronized String getUID(Message msg) throws MessagingException {
454 checkOpen();
455 if (!(msg instanceof POP3Message))
456 throw new MessagingException("message is not a POP3Message");
457 POP3Message m = (POP3Message)msg;
458 try {
459 if (!store.supportsUidl)
460 return null;
461 if (m.uid == POP3Message.UNKNOWN)
462 m.uid = port.uidl(m.getMessageNumber());
463 return m.uid;
464 } catch (EOFException eex) {
465 close(false);
466 throw new FolderClosedException(this, eex.toString());
467 } catch (IOException ex) {
468 throw new MessagingException("error getting UIDL", ex);
469 }
470 }
471
472 /**
473 * Return the size of this folder, as was returned by the POP3 STAT

Callers

nothing calls this directly

Calls 5

checkOpenMethod · 0.95
closeMethod · 0.95
uidlMethod · 0.80
getMessageNumberMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected