Polishing
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user