continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r706089 - /continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Date Mon, 20 Oct 2008 00:01:02 GMT
Author: ctan
Date: Sun Oct 19 17:01:01 2008
New Revision: 706089

URL: http://svn.apache.org/viewvc?rev=706089&view=rev
Log:
merge -r 706085:706086 from continuum-1.2.x branch
[CONTINUUM-1937] fixed NPE when editing project group

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=706089&r1=706088&r2=706089&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Sun Oct 19 17:01:01 2008
@@ -362,14 +362,16 @@
 
         repositories = getContinuum().getRepositoryService().getAllLocalRepositories();
 
-        Project rootProject = ( getContinuum().getProjectsInBuildOrder( getContinuum()
-            .getProjectsInGroupWithDependencies( projectGroup.getId() ) ) ).get( 0 );
-        
-        if (rootProject != null)
+        Collection<Project> projects = getContinuum().getProjectsInGroupWithDependencies(
projectGroup.getId() );
+        if ( projects != null && projects.size() > 0 )
         {
-            setUrl( rootProject.getUrl() );
-        }
+            Project rootProject = ( getContinuum().getProjectsInBuildOrder( projects ) ).get(
0 );
         
+            if (rootProject != null)
+            {
+                setUrl( rootProject.getUrl() );
+            }
+        }
         return SUCCESS;
     }
 



Mime
View raw message