Skip to content

Commit

Permalink
Reuse Boolean.toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Dec 15, 2023
1 parent 6653f2d commit c0fdc5a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/apache/commons/mail/Email.java
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,11 @@ public Session getMailSession() throws EmailException {
properties.setProperty(EmailConstants.MAIL_HOST, this.hostName);
properties.setProperty(EmailConstants.MAIL_DEBUG, String.valueOf(this.debug));

properties.setProperty(EmailConstants.MAIL_TRANSPORT_STARTTLS_ENABLE, isStartTLSEnabled() ? "true" : "false");
properties.setProperty(EmailConstants.MAIL_TRANSPORT_STARTTLS_REQUIRED, isStartTLSRequired() ? "true" : "false");
properties.setProperty(EmailConstants.MAIL_TRANSPORT_STARTTLS_ENABLE, Boolean.toString(isStartTLSEnabled()));
properties.setProperty(EmailConstants.MAIL_TRANSPORT_STARTTLS_REQUIRED, Boolean.toString(isStartTLSRequired()));

properties.setProperty(EmailConstants.MAIL_SMTP_SEND_PARTIAL, isSendPartial() ? "true" : "false");
properties.setProperty(EmailConstants.MAIL_SMTPS_SEND_PARTIAL, isSendPartial() ? "true" : "false");
properties.setProperty(EmailConstants.MAIL_SMTP_SEND_PARTIAL, Boolean.toString(isSendPartial()));
properties.setProperty(EmailConstants.MAIL_SMTPS_SEND_PARTIAL, Boolean.toString(isSendPartial()));

if (this.authenticator != null) {
properties.setProperty(EmailConstants.MAIL_SMTP_AUTH, "true");
Expand Down

0 comments on commit c0fdc5a

Please sign in to comment.