avoiding potential NPE in setReplyToAddress()

This commit is contained in:
Mark Fisher
2011-08-04 22:12:14 -04:00
parent 2225e4f419
commit dad004a233

View File

@@ -165,11 +165,11 @@ public class MessageProperties {
}
public void setReplyToAddress(Address replyTo) {
this.replyTo = replyTo.toString();
this.replyTo = (replyTo != null) ? replyTo.toString() : null;
}
public Address getReplyToAddress() {
return this.replyTo == null ? null : new Address(this.replyTo);
return (this.replyTo != null) ? new Address(this.replyTo) : null;
}
public void setContentType(String contentType) {