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

Method setProvider

app/src/main/java/javax/mail/Session.java:531–540  ·  view source on GitHub ↗

Set the passed Provider to be the default implementation for the protocol in Provider.protocol overriding any previous values. @param provider Currently configured Provider which will be set as the default for the protocol @exception NoSuchProviderException If the provider passed in is invalid.

(Provider provider)

Source from the content-addressed store, hash-verified

529 * is invalid.
530 */
531 public synchronized void setProvider(Provider provider)
532 throws NoSuchProviderException {
533 if (provider == null) {
534 throw new NoSuchProviderException("Can't set null provider");
535 }
536 providersByProtocol.put(provider.getProtocol(), provider);
537 providersByClassName.put(provider.getClassName(), provider);
538 props.put("mail." + provider.getProtocol() + ".class",
539 provider.getClassName());
540 }
541
542
543 /**

Callers

nothing calls this directly

Calls 3

getClassNameMethod · 0.80
putMethod · 0.45
getProtocolMethod · 0.45

Tested by

no test coverage detected