continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r706092 - /continuum/branches/continuum-1.2.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Date Mon, 20 Oct 2008 00:53:26 GMT
Author: ctan
Date: Sun Oct 19 17:53:26 2008
New Revision: 706092

URL: http://svn.apache.org/viewvc?rev=706092&view=rev
Log:
- fixed NPE when saving project group
- [CONTINUUM-1937] rename variables

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=706092&r1=706091&r2=706092&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 17:53:26 2008
@@ -362,11 +362,11 @@
 
         repositories = getContinuum().getRepositoryService().getAllLocalRepositories();
 
-        Collection<Project> projects = getContinuum().getProjectsInGroupWithDependencies(
projectGroup.getId() );
-        if ( projects != null && projects.size() > 0 )
+        Collection<Project> projList = getContinuum().getProjectsInGroupWithDependencies(
projectGroup.getId() );
+        if ( projList != null && projList.size() > 0 )
         {
             Project rootProject = ( getContinuum().getProjectsInBuildOrder( projects ) ).get(
0 );
-        
+
             if (rootProject != null)
             {
                 setUrl( rootProject.getUrl() );
@@ -453,13 +453,16 @@
 
         getContinuum().updateProjectGroup( projectGroup );
 
-        Project rootProject = ( getContinuum().getProjectsInBuildOrder( getContinuum()
-            .getProjectsInGroupWithDependencies( projectGroupId ) ) ).get( 0 );
-        
-        rootProject.setUrl( url );
-        
-        getContinuum().updateProject( rootProject );
-        
+        Collection<Project> projectList = getContinuum().getProjectsInGroupWithDependencies(
projectGroupId );
+        if ( projectList != null && projectList.size() > 0 )
+        {
+            Project rootProject = ( getContinuum().getProjectsInBuildOrder( projectList )
).get( 0 );
+
+            rootProject.setUrl( url );
+
+            getContinuum().updateProject( rootProject );
+        }
+
         Iterator keys = projects.keySet().iterator();
         while ( keys.hasNext() )
         {



Mime
View raw message