continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r326603 - in /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification: ContinuumRecipientSource.java DefaultContinuumNotificationDispatcher.java
Date Wed, 19 Oct 2005 16:34:53 GMT
Author: evenisse
Date: Wed Oct 19 09:34:48 2005
New Revision: 326603

URL: http://svn.apache.org/viewcvs?rev=326603&view=rev
Log:
[CONTINUUM-327] Fix duplicate mails when project contains two mail notifier

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/ContinuumRecipientSource.java
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.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=326603&r1=326602&r2=326603&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
Wed Oct 19 09:34:48 2005
@@ -69,7 +69,7 @@
     // RecipientSource Implementation
     // ----------------------------------------------------------------------
 
-    public Set getRecipients( String notifierType, String messageId, Map configuration, Map
context )
+    public Set getRecipients( String notifierId, String messageId, Map configuration, Map
context )
         throws NotificationException
     {
         Project project = (Project) context.get( ContinuumNotificationDispatcher.CONTEXT_PROJECT
);
@@ -91,7 +91,7 @@
             {
                 ProjectNotifier notifier = (ProjectNotifier) notifierIterator.next();
 
-                if ( notifier.getType().equals( notifierType ) &&
+                if ( notifier.getId() == new Integer( notifierId ).intValue() &&
                     notifier.getConfiguration().containsKey( ADDRESS_FIELD ) )
                 {
                     String addressField = (String) notifier.getConfiguration().get( ADDRESS_FIELD
);

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?rev=326603&r1=326602&r2=326603&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
Wed Oct 19 09:34:48 2005
@@ -164,7 +164,8 @@
             {
                 Notifier notifier = notifierManager.getNotifier( notifierType );
 
-                Set recipients = recipientSource.getRecipients( notifierType, messageId,
configuration, context );
+                Set recipients = recipientSource.getRecipients( String.valueOf( projectNotifier.getId()
),
+                                                                messageId, configuration,
context );
 
                 notifier.sendNotification( messageId, recipients, projectNotifier.getConfiguration(),
context );
             }



Mime
View raw message