Skip to content

Commit

Permalink
Merge pull request thunderbird#3808 from artbristol/remove-exception-…
Browse files Browse the repository at this point in the history
…todo

Remove TODO
  • Loading branch information
Valodim authored Dec 10, 2018
2 parents 278e7d3 + 5e3141d commit d1c4701
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,4 @@ public boolean isPermanentFailure() {
return permanentFailure;
}

//TODO setters in Exception are bad style, remove (it's nearly unused anyway)
public void setPermanentFailure(boolean permanentFailure) {
this.permanentFailure = permanentFailure;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,10 @@ public void setFlags(List<? extends Message> messages, final Set<Flag> flags, bo

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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,7 @@ private void sendMessageTo(List<String> addresses, Message message)
} 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();
}
Expand Down

0 comments on commit d1c4701

Please sign in to comment.