continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r486538 - /maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Date Wed, 13 Dec 2006 07:52:08 GMT
Author: brett
Date: Tue Dec 12 23:52:07 2006
New Revision: 486538

URL: http://svn.apache.org/viewvc?view=rev&rev=486538
Log:
prevent an NPE
Submitted by: Franz Allen Valencia See

Modified:
    maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java

Modified: maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java?view=diff&rev=486538&r1=486537&r2=486538
==============================================================================
--- maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
(original)
+++ maven/continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
Tue Dec 12 23:52:07 2006
@@ -223,20 +223,24 @@
 
         // iterate through the project groups and make sure we are not walking over projects
that
         // might define their own build definitions
-        for ( Iterator i = projectGroupSource.keySet().iterator(); i.hasNext(); )
+        if ( projectGroupSource != null )
         {
-            Integer projectGroupId = (Integer) i.next();
-            List projectsInGroup = getProjectsInGroup( projectGroupId.intValue() );
-
-            for ( Iterator j = projectsInGroup.iterator(); j.hasNext(); )
+        	for ( Iterator i = projectGroupSource.keySet().iterator(); i.hasNext(); )
             {
-                Integer projectId = new Integer( ( (Project) j.next() ).getId() );
-                if ( !aggregate.keySet().contains( projectId ) )
+                Integer projectGroupId = (Integer) i.next();
+                List projectsInGroup = getProjectsInGroup( projectGroupId.intValue() );
+
+                for ( Iterator j = projectsInGroup.iterator(); j.hasNext(); )
                 {
-                    aggregate.put( projectId, projectGroupSource.get( projectGroupId ) );
+                    Integer projectId = new Integer( ( (Project) j.next() ).getId() );
+                    if ( !aggregate.keySet().contains( projectId ) )
+                    {
+                        aggregate.put( projectId, projectGroupSource.get( projectGroupId
) );
+                    }
                 }
             }
         }
+        
         return aggregate;
     }
 



Mime
View raw message