Small improvement

This commit is contained in:
M66B 2019-12-19 11:53:37 +01:00
parent 6b6a4868cc
commit 3ceaf6fcd3
1 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ public class MailService implements AutoCloseable {
} }
public String connect(String host, int port, int auth, String user, String password, String fingerprint) throws MessagingException { public String connect(String host, int port, int auth, String user, String password, String fingerprint) throws MessagingException {
SSLSocketFactoryService factory; SSLSocketFactoryService factory = null;
try { try {
factory = new SSLSocketFactoryService(host, insecure, fingerprint); factory = new SSLSocketFactoryService(host, insecure, fingerprint);
properties.put("mail." + protocol + ".ssl.socketFactory", factory); properties.put("mail." + protocol + ".ssl.socketFactory", factory);
@ -222,7 +222,7 @@ public class MailService implements AutoCloseable {
properties.put("mail." + protocol + ".ssl.checkserveridentity", Boolean.toString(!insecure)); properties.put("mail." + protocol + ".ssl.checkserveridentity", Boolean.toString(!insecure));
if (insecure) if (insecure)
properties.put("mail." + protocol + ".ssl.trust", "*"); properties.put("mail." + protocol + ".ssl.trust", "*");
throw new MessagingException("Trust issues", ex); Log.e("Trust issues", ex);
} }
try { try {