continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r706086 - /continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Date Sun, 19 Oct 2008 23:30:15 GMT
Author: ctan
Date: Sun Oct 19 16:30:15 2008
New Revision: 706086

URL: http://svn.apache.org/viewvc?rev=706086&view=rev
Log:
[CONTINUUM-1937] fixed NPE when editing a project group

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

Modified: continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=706086&r1=706085&r2=706086&view=diff
==============================================================================
--- continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Sun Oct 19 16:30:15 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