mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 11:01:23 +01:00
Filter/clarify exceptions
This commit is contained in:
@@ -601,11 +601,15 @@ public class MessageHelper {
|
||||
return null;
|
||||
|
||||
// https://www.ietf.org/rfc/rfc2368.txt
|
||||
MailTo to = MailTo.parse(list.substring(1, list.length() - 1));
|
||||
if (to.getTo() == null)
|
||||
return null;
|
||||
try {
|
||||
MailTo to = MailTo.parse(list.substring(1, list.length() - 1));
|
||||
if (to.getTo() == null)
|
||||
return null;
|
||||
|
||||
return new Address[]{new InternetAddress(to.getTo().split(",")[0])};
|
||||
return new Address[]{new InternetAddress(to.getTo().split(",")[0])};
|
||||
} catch (android.net.ParseException ex) {
|
||||
throw new ParseException(list);
|
||||
}
|
||||
} catch (android.net.ParseException ex) {
|
||||
Log.w(ex);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user