You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ct...@apache.org on 2008/12/18 12:28:38 UTC

svn commit: r727698 - /continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java

Author: ctan
Date: Thu Dec 18 03:28:37 2008
New Revision: 727698

URL: http://svn.apache.org/viewvc?rev=727698&view=rev
Log:
[CONTINUUM-2021] check if mail recipients is empty. if empty then do not send

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=727698&r1=727697&r2=727698&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java Thu Dec 18 03:28:37 2008
@@ -772,7 +772,10 @@
 
             message.setSentDate( new Date() );
 
-            javaMailSender.send( message );
+            if ( message.getAllRecipients() != null && ( (Address[]) message.getAllRecipients() ).length > 0 )
+            {
+                javaMailSender.send( message );
+            }
         }
         catch ( AddressException ex )
         {
@@ -873,7 +876,10 @@
 
             message.setSentDate( new Date() );
 
-            javaMailSender.send( message );
+            if ( message.getAllRecipients() != null && ( (Address[]) message.getAllRecipients() ).length > 0 )
+            {
+                javaMailSender.send( message );
+            }
         }
         catch ( AddressException ex )
         {