continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r191132 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
Date Fri, 17 Jun 2005 11:47:06 GMT
Author: evenisse
Date: Fri Jun 17 04:47:06 2005
New Revision: 191132

URL: http://svn.apache.org/viewcvs?rev=191132&view=rev
Log:
Allow mutiple addresses.

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

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java?rev=191132&r1=191131&r2=191132&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
Fri Jun 17 04:47:06 2005
@@ -25,10 +25,8 @@
 import org.apache.maven.continuum.project.ContinuumNotifier;
 import org.apache.maven.continuum.project.ContinuumProject;
 
-import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.notification.AbstractRecipientSource;
 import org.codehaus.plexus.notification.NotificationException;
-import org.codehaus.plexus.notification.RecipientSource;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -42,7 +40,7 @@
 {
     public static String ADDRESS_FIELD = "address";
 
-    /** @configuration */
+    /** @plexus.configuration */
     private String toOverride;
 
     // ----------------------------------------------------------------------
@@ -87,13 +85,20 @@
         }
         else if ( project.getNotifiers() != null && !project.getNotifiers().isEmpty()
)
         {
-            for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )
+            for ( Iterator notifierIterator = project.getNotifiers().iterator(); notifierIterator.hasNext();
)
             {
-                ContinuumNotifier notifier = (ContinuumNotifier) i.next();
+                ContinuumNotifier notifier = (ContinuumNotifier) notifierIterator.next();
 
                 if ( notifier.getType().equals( notifierType ) && notifier.getConfiguration().containsKey(
ADDRESS_FIELD ) )
                 {
-                    recipients.add( notifier.getConfiguration().getProperty( ADDRESS_FIELD
) );
+                    String addressField = notifier.getConfiguration().getProperty( ADDRESS_FIELD
);
+
+                    String[] addresses = StringUtils.split( addressField, "," );
+
+                    for ( int i = 0; i < addresses.length; i++ )
+                    {
+                        recipients.add( addresses[i].trim() );
+                    }
                 }
             }
         }



Mime
View raw message