continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r822135 - /continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Tue, 06 Oct 2009 05:54:47 GMT
Author: ctan
Date: Tue Oct  6 05:54:47 2009
New Revision: 822135

URL: http://svn.apache.org/viewvc?rev=822135&view=rev
Log:
[CONTINUUM-1031] use getBuildResultsForProject instead of getProjectWithBuilds to improve
performance when deleting a project
merge -r 822133:822134 from 1.3.x branch

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=822135&r1=822134&r2=822135&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Tue Oct  6 05:54:47 2009
@@ -605,7 +605,7 @@
     {
         try
         {
-            Project project = getProjectWithBuilds( projectId );
+            Project project = getProject( projectId );
 
             try
             {
@@ -674,9 +674,10 @@
 
             log.info( "Remove project " + project.getName() + "(" + projectId + ")" );
 
-            for ( Object o : project.getBuildResults() )
+            Collection<BuildResult> buildResults = getBuildResultsForProject( projectId
);
+
+            for ( BuildResult br : buildResults )
             {
-                BuildResult br = (BuildResult) o;
                 br.setBuildDefinition( null );
                 //Remove all modified dependencies to prevent SQL errors
                 br.setModifiedDependencies( null );



Mime
View raw message