continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r406045 - /maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Date Sat, 13 May 2006 08:31:13 GMT
Author: evenisse
Date: Sat May 13 01:31:13 2006
New Revision: 406045

URL: http://svn.apache.org/viewcvs?rev=406045&view=rev
Log:
[CONTINUUM-678] Fix duplicated notifiers

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java?rev=406045&r1=406044&r2=406045&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Sat May 13 01:31:13 2006
@@ -282,7 +282,29 @@
 
             if ( notifier != null )
             {
-                notifiers.add( notifier );
+                boolean containsNotifier = false;
+
+                for ( Iterator i = notifiers.iterator(); i.hasNext(); )
+                {
+                    ProjectNotifier n = (ProjectNotifier) i.next();
+                    if ( n.getConfiguration() != null )
+                    {
+                        String address = (String) n.getConfiguration().get( ContinuumRecipientSource.ADDRESS_FIELD
);
+
+                        if ( address != null )
+                        {
+                            if ( address.equals( notifier.getConfiguration().get( ContinuumRecipientSource.ADDRESS_FIELD
) ) )
+                            {
+                                containsNotifier = true;
+                            }
+                        }
+                    }
+                }
+
+                if ( !containsNotifier )
+                {
+                    notifiers.add( notifier );
+                }
             }
 
             // Add notifier defined by user



Mime
View raw message