Skip to content

Commit 37bbbad

Browse files
committed
minor Javadoc and code clarification
1 parent c548698 commit 37bbbad

File tree

1 file changed

+9
-5
lines changed
  • modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/mailsender

1 file changed

+9
-5
lines changed

modules/simple-java-mail/src/main/java/org/simplejavamail/mailer/internal/mailsender/MailSenderImpl.java

+9-5
Original file line numberDiff line numberDiff line change
@@ -202,22 +202,26 @@ private void configureSessionWithTimeout(@Nonnull final Session session, final i
202202

203203
/**
204204
* Separate closure that can be executed directly or from a thread. Refer to {@link #send(Email, boolean)} for details.
205+
* <p>
206+
* Note that this Runnable implementation is <strong>not</strong> thread related, it is just to encapsulate the code to
207+
* be run directly or from a <em>real</em> Runnable.
205208
*/
206209
private class SendMailClosure implements Runnable {
207210

208211
@Nonnull final Session session;
209212
@Nonnull final Email email;
210-
private final boolean async;
213+
private final boolean asyncForLoggingPurpose;
214+
211215

212216
/**
213217
* @param session The session with which to produce the {@link MimeMessage} aquire the {@link Transport} for connections.
214218
* @param email The email that will be converted into a {@link MimeMessage}.
215-
* @param async For logging purposes, indicates whether this closure is running in async mode.
219+
* @param asyncForLoggingPurpose For logging purposes, indicates whether this closure is running in async mode.
216220
*/
217-
private SendMailClosure(@Nonnull Session session, @Nonnull Email email, boolean async) {
221+
private SendMailClosure(@Nonnull Session session, @Nonnull Email email, boolean asyncForLoggingPurpose) {
218222
this.session = session;
219223
this.email = email;
220-
this.async = async;
224+
this.asyncForLoggingPurpose = asyncForLoggingPurpose;
221225
}
222226

223227
@SuppressWarnings("deprecation")
@@ -230,7 +234,7 @@ public void run() {
230234

231235
configureBounceToAddress(session, email);
232236

233-
logSession(session, async, "mail");
237+
logSession(session, asyncForLoggingPurpose, "mail");
234238
message.saveChanges(); // some headers and id's will be set for this specific message
235239
email.internalSetId(message.getMessageID());
236240

0 commit comments

Comments
 (0)