JAMES-1877 Simplify handleMessagingException of DeliveryRunnable
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/1467986e Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/1467986e Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/1467986e Branch: refs/heads/master Commit: 1467986ea395c04603b02ac09c692cc99745daca Parents: f567a5a Author: Benoit Tellier <[email protected]> Authored: Fri Dec 2 10:26:14 2016 +0700 Committer: Benoit Tellier <[email protected]> Committed: Tue Jan 10 15:12:51 2017 +0700 ---------------------------------------------------------------------- .../james/transport/mailets/remoteDelivery/DeliveryRunnable.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/1467986e/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/DeliveryRunnable.java ---------------------------------------------------------------------- diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/DeliveryRunnable.java b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/DeliveryRunnable.java index 37ae531..6317209 100644 --- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/DeliveryRunnable.java +++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/remoteDelivery/DeliveryRunnable.java @@ -266,14 +266,13 @@ public class DeliveryRunnable implements Runnable { } private MessagingException handleMessagingException(Mail mail, MessagingException me) throws MessagingException { - MessagingException lastError;// MessagingException are horribly difficult to figure out what actually happened. logger.debug("Exception delivering message (" + mail.getName() + ") - " + me.getMessage()); if ((me.getNextException() != null) && (me.getNextException() instanceof IOException)) { // This is more than likely a temporary failure // If it's an IO exception with no nested exception, it's probably // some socket or weird I/O related problem. - lastError = me; + return me; } else { // This was not a connection or I/O error particular to one // SMTP server of an MX set. Instead, it is almost certainly @@ -284,7 +283,6 @@ public class DeliveryRunnable implements Runnable { // severity. throw me; } - return lastError; } private ExecutionResult handleSenderFailedException(Mail mail, SendFailedException sfe) { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
