continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r389791 - /maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m1/DefaultMavenOneMetadataHelper.java
Date Wed, 29 Mar 2006 13:31:51 GMT
Author: evenisse
Date: Wed Mar 29 05:31:48 2006
New Revision: 389791

URL: http://svn.apache.org/viewcvs?rev=389791&view=rev
Log:
[CONTINUUM-644] Fix ConcurrentModificationException

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=389791&r1=389790&r2=389791&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
Wed Mar 29 05:31:48 2006
@@ -244,13 +244,15 @@
 
         List notifiers = null;
 
-        ProjectNotifier notifier = new ProjectNotifier();
+        ProjectNotifier notifier = null;
 
         if ( build == null )
         {
             if ( project.getNotifiers() != null && !project.getNotifiers().isEmpty()
)
             {
-                notifiers = project.getNotifiers();
+                notifiers = new ArrayList();
+
+                notifiers.addAll( project.getNotifiers() );
             }
         }
         else
@@ -263,22 +265,25 @@
 
                 props.put( ContinuumRecipientSource.ADDRESS_FIELD, nagEmailAddress );
 
+                notifier = new ProjectNotifier();
+
                 notifier.setConfiguration( props );
 
                 notifier.setFrom( ProjectNotifier.FROM_PROJECT );
             }
         }
 
-        if ( notifier == null && ( notifiers == null || notifiers.isEmpty() ) )
-        {
-        }
-        else
+        if ( ( notifiers != null && !notifiers.isEmpty() ) || notifier != null )
         {
             if ( notifiers == null )
             {
                 notifiers = new ArrayList();
             }
-            notifiers.add( notifier );
+
+            if ( notifier != null )
+            {
+                notifiers.add( notifier );
+            }
 
             // Add notifier defined by user
             for ( Iterator i = project.getNotifiers().iterator(); i.hasNext(); )
@@ -291,7 +296,7 @@
 
                     userNotifier.setType( notif.getType() );
 
-                    userNotifier.setEnabled( notifier.isEnabled() );
+                    userNotifier.setEnabled( notif.isEnabled() );
 
                     userNotifier.setConfiguration( notif.getConfiguration() );
 



Mime
View raw message