Polishing

This commit is contained in:
Juergen Hoeller
2017-10-23 19:03:56 +02:00
parent 99d39eb2ee
commit db7d71503d
4 changed files with 42 additions and 8 deletions

View File

@@ -24,7 +24,8 @@ import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* Models a simple mail message, including data such as the from, to, cc, subject, and text fields.
* Models a simple mail message, including data such as the from, to, cc, subject,
* and text fields.
*
* <p>Consider {@code JavaMailSender} and JavaMail {@code MimeMessages} for creating
* more sophisticated messages, for example messages with attachments, special
@@ -179,10 +180,9 @@ public class SimpleMailMessage implements MailMessage, Serializable {
/**
* Copy the contents of this message to the given target message.
* @param target the {@code MailMessage} to copy to
* @throws IllegalArgumentException if the supplied {@code target} is {@code null}
*/
public void copyTo(MailMessage target) {
Assert.notNull(target, "The 'target' message argument cannot be null");
Assert.notNull(target, "'target' message argument must not be null");
if (getFrom() != null) {
target.setFrom(getFrom());
}