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

Method readResolve

app/src/main/java/javax/mail/Message.java:243–253  ·  view source on GitHub ↗

When deserializing a RecipientType, we need to make sure to return only one of the known static final instances defined in this class. Subclasses must implement their own readResolve method that checks for their known instances before calling this super method. @return the RecipientTy

()

Source from the content-addressed store, hash-verified

241 * @exception ObjectStreamException for object stream errors
242 */
243 protected Object readResolve() throws ObjectStreamException {
244 if (type.equals("To"))
245 return TO;
246 else if (type.equals("Cc"))
247 return CC;
248 else if (type.equals("Bcc"))
249 return BCC;
250 else
251 throw new InvalidObjectException(
252 "Attempt to resolve unknown RecipientType: " + type);
253 }
254
255 @Override
256 public String toString() {

Callers

nothing calls this directly

Calls 1

equalsMethod · 0.45

Tested by

no test coverage detected