Merge pull request #3808 from artbristol/remove-exception-todo
Remove TODO
This commit is contained in:
commit
d1c4701256
3 changed files with 5 additions and 13 deletions
|
@ -28,9 +28,4 @@ public class MessagingException extends Exception {
|
|||
return permanentFailure;
|
||||
}
|
||||
|
||||
//TODO setters in Exception are bad style, remove (it's nearly unused anyway)
|
||||
public void setPermanentFailure(boolean permanentFailure) {
|
||||
this.permanentFailure = permanentFailure;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -565,10 +565,10 @@ public class Pop3Folder extends Folder<Pop3Message> {
|
|||
|
||||
Integer msgNum = uidToMsgNumMap.get(message.getUid());
|
||||
if (msgNum == null) {
|
||||
MessagingException me = new MessagingException("Could not delete message " + message.getUid()
|
||||
+ " because no msgNum found; permanent error");
|
||||
me.setPermanentFailure(true);
|
||||
throw me;
|
||||
throw new MessagingException(
|
||||
"Could not delete message " + message.getUid() + " because no msgNum found; permanent error",
|
||||
true
|
||||
);
|
||||
}
|
||||
open(Folder.OPEN_MODE_RW);
|
||||
connection.executeSimpleCommand(String.format(DELE_COMMAND + " %s", msgNum));
|
||||
|
|
|
@ -452,10 +452,7 @@ public class SmtpTransport extends Transport {
|
|||
} catch (NegativeSmtpReplyException e) {
|
||||
throw e;
|
||||
} catch (Exception e) {
|
||||
MessagingException me = new MessagingException("Unable to send message", e);
|
||||
me.setPermanentFailure(entireMessageSent);
|
||||
|
||||
throw me;
|
||||
throw new MessagingException("Unable to send message", entireMessageSent, e);
|
||||
} finally {
|
||||
close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue