Skip to content
Snippets Groups Projects
Commit 07efa159 authored by Simon Urli's avatar Simon Urli
Browse files

XWIKI-12179: MailSenderScriptService will throw a nullpointerexception if...

XWIKI-12179: MailSenderScriptService will throw a nullpointerexception if there is any issue instead of returning null

  * Bulletproof the API by checking if the result is null before using
    it
parent 6872d3e9
No related branches found
No related tags found
No related merge requests found
......@@ -236,8 +236,10 @@ public ScriptMailResult send(Iterable<? extends MimeMessage> messages, String hi
{
ScriptMailResult scriptMailResult = sendAsynchronously(messages, hint);
// Wait for all messages from this batch to have been sent before returning
scriptMailResult.getStatusResult().waitTillProcessed(Long.MAX_VALUE);
if (scriptMailResult != null) {
// Wait for all messages from this batch to have been sent before returning
scriptMailResult.getStatusResult().waitTillProcessed(Long.MAX_VALUE);
}
return scriptMailResult;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment