Skip to content

Commit

Permalink
Revert "Handle provider not found"
Browse files Browse the repository at this point in the history
This reverts commit fdce403.
  • Loading branch information
M66B committed May 18, 2022
1 parent a368e80 commit 95b411f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions app/src/main/java/eu/faircode/email/EmailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import com.sun.mail.util.TraceOutputStream;

import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
Expand Down Expand Up @@ -457,8 +456,6 @@ private void connect(
try {
authenticator.refreshToken(true);
connect(host, port, auth, user, factory);
} catch (FileNotFoundException ex1) {
throw new AuthenticationFailedException(ex1.getMessage(), ex1);
} catch (Exception ex1) {
Log.e(ex1);
String msg = ex.getMessage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import org.json.JSONException;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;
import java.util.Objects;
Expand Down Expand Up @@ -147,7 +146,7 @@ interface IAuthenticated {
}

private static void OAuthRefresh(Context context, String id, AuthState authState, boolean expire, long keep_alive)
throws FileNotFoundException, MessagingException {
throws MessagingException {
try {
Long expiration = authState.getAccessTokenExpirationTime();
if (expiration != null && expiration - keep_alive < new Date().getTime()) {
Expand Down Expand Up @@ -189,8 +188,6 @@ public void execute(String accessToken, String idToken, AuthorizationException e

if (holder.error != null)
throw holder.error;
} catch (FileNotFoundException ex) {
throw ex; // provider not found
} catch (Exception ex) {
throw new MessagingException("OAuth refresh id=" + id, ex);
}
Expand Down

0 comments on commit 95b411f

Please sign in to comment.