Caldav: fix NullPointerException in notifications

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@885 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-12-17 23:02:59 +00:00
parent a4d8a5c33d
commit 1b54134f85
1 changed files with 5 additions and 4 deletions

View File

@ -2321,11 +2321,12 @@ public class ExchangeSession {
// Make sure invites have a proper subject line
writer.write("Subject: " + MimeUtility.encodeText(getICSSummary(icsBody), "UTF-8", null) + "\r\n");
writer.write("To: ");
writer.write(recipients);
writer.write("\r\n");
// do not send notification if no recipients found
if (recipients.length() == 0) {
if (recipients != null && recipients.length() > 0) {
writer.write("To: ");
writer.write(recipients);
writer.write("\r\n");
} else {
status = HttpStatus.SC_NO_CONTENT;
}
} else {