Revert "Handle provider not found"

This reverts commit fdce403c26.
pull/207/head
M66B 3 years ago
parent a368e807af
commit 95b411f5c2

@ -47,7 +47,6 @@ import com.sun.mail.util.SocketConnectException;
import com.sun.mail.util.TraceOutputStream; import com.sun.mail.util.TraceOutputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.PrintStream; import java.io.PrintStream;
@ -457,8 +456,6 @@ public class EmailService implements AutoCloseable {
try { try {
authenticator.refreshToken(true); authenticator.refreshToken(true);
connect(host, port, auth, user, factory); connect(host, port, auth, user, factory);
} catch (FileNotFoundException ex1) {
throw new AuthenticationFailedException(ex1.getMessage(), ex1);
} catch (Exception ex1) { } catch (Exception ex1) {
Log.e(ex1); Log.e(ex1);
String msg = ex.getMessage(); String msg = ex.getMessage();

@ -34,7 +34,6 @@ import net.openid.appauth.NoClientAuthentication;
import org.json.JSONException; import org.json.JSONException;
import java.io.FileNotFoundException;
import java.io.IOException; import java.io.IOException;
import java.util.Date; import java.util.Date;
import java.util.Objects; import java.util.Objects;
@ -147,7 +146,7 @@ public class ServiceAuthenticator extends Authenticator {
} }
private static void OAuthRefresh(Context context, String id, AuthState authState, boolean expire, long keep_alive) private static void OAuthRefresh(Context context, String id, AuthState authState, boolean expire, long keep_alive)
throws FileNotFoundException, MessagingException { throws MessagingException {
try { try {
Long expiration = authState.getAccessTokenExpirationTime(); Long expiration = authState.getAccessTokenExpirationTime();
if (expiration != null && expiration - keep_alive < new Date().getTime()) { if (expiration != null && expiration - keep_alive < new Date().getTime()) {
@ -189,8 +188,6 @@ public class ServiceAuthenticator extends Authenticator {
if (holder.error != null) if (holder.error != null)
throw holder.error; throw holder.error;
} catch (FileNotFoundException ex) {
throw ex; // provider not found
} catch (Exception ex) { } catch (Exception ex) {
throw new MessagingException("OAuth refresh id=" + id, ex); throw new MessagingException("OAuth refresh id=" + id, ex);
} }

Loading…
Cancel
Save