continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r819456 - in /continuum/branches/continuum-1.3.x/continuum-core/src: main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
Date Mon, 28 Sep 2009 05:50:03 GMT
Author: ctan
Date: Mon Sep 28 05:50:03 2009
New Revision: 819456

URL: http://svn.apache.org/viewvc?rev=819456&view=rev
Log:
[CONTINUUM-2207] prevent setting a null scmResult to avoid getting a missing value for 'scmResult'
key error

Modified:
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java?rev=819456&r1=819455&r2=819456&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
Mon Sep 28 05:50:03 2009
@@ -159,7 +159,7 @@
                     log.info(
                         "Ending prepare build of project: " + AbstractContinuumAction.getProject(
context ).getName() );
                     scmResultMap.put( AbstractContinuumAction.getProjectId( context ),
-                                      AbstractContinuumAction.getScmResult( context, null
) );
+                                      AbstractContinuumAction.getScmResult( context, new
ScmResult() ) );
                     endProjectPrepareBuild( context );
                 }
             }
@@ -262,6 +262,13 @@
             scmResult = CheckoutProjectContinuumAction.getCheckoutResult( context, null );
         }
 
+        // [CONTINUUM-2207] when returned scmResult is null, this causes a problem when building
the project 
+        if ( scmResult == null )
+        {
+            log.debug( "Returned ScmResult is null when updating the working directory" );
+            scmResult = new ScmResult();
+        }
+
         AbstractContinuumAction.setScmResult( context, scmResult );
     }
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java?rev=819456&r1=819455&r2=819456&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
Mon Sep 28 05:50:03 2009
@@ -278,6 +278,7 @@
         assertTrue( "module-b was not checked out in the same directory as it's parent.",
new File( checkedOutDir, "module-b" ).exists() );
     }
 */
+    
     private PrepareBuildProjectsTask createTask( String pomResource, boolean singleCheckout,
boolean buildFresh )
         throws Exception
     {



Mime
View raw message