Skip to content

Commit

Permalink
🎨 improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
hellokaton committed Oct 9, 2018
1 parent e651930 commit 4b05766
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/io/github/biezhi/ome/OhMyEmail.java
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ private MimeBodyPart createURLAttachment(URL url, String fileName) throws SendMa
}

public void send() throws SendMailException {
if (text == null && html == null)
throw new NullPointerException("At least one context has to be provided: Text or Html");
if (text == null && html == null) {
throw new IllegalArgumentException("At least one context has to be provided: Text or Html");
}

MimeMultipart cover;
boolean usingAlternative = false;
Expand Down

0 comments on commit 4b05766

Please sign in to comment.